1 # ============================================================================ 2 # Copyright (c) 2015 <provider-name> 5 # See COPYING file for license information. 6 # ============================================================================ 8 ############################################################################## 10 # @brief Non-default project settings. 12 # This file is included by basis_project_impl(), after it looked for the 13 # required and optional dependencies and the CMake variables related to the 14 # project directory structure were defined (see Directories.cmake file in 15 # @c BINARY_CONFIG_DIR). It is also included before the BasisSettings.cmake 18 # In particular build options should be added in this file using CMake's 19 # <a href="http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:option"> 20 # option()</a> command. Further, any common settings related to using a found 21 # dependency can be set here if the basis_use_package() command was enable 22 # to import the required configuration of a particular external package. 24 # @ingroup BasisSettings 25 ############################################################################## 27 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_PROJECT_DIR}/config)
30 include(CheckCXXCompilerFlag)
31 CHECK_CXX_COMPILER_FLAG(
"-std=c++11" COMPILER_SUPPORTS_CXX11)
32 CHECK_CXX_COMPILER_FLAG(
"-std=c++0x" COMPILER_SUPPORTS_CXX0X)
33 if(COMPILER_SUPPORTS_CXX11)
34 set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -std=c++11")
35 elseif(COMPILER_SUPPORTS_CXX0X)
36 set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -std=c++0x")
38 message(FATAL_ERROR
"The compiler ${CMAKE_CXX_COMPILER} has no C++11 support, or our tests failed to detect it correctly. Please use a different C++ compiler or report this problem to the developers.")
41 if(UNIX AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
42 ADD_DEFINITIONS(-fPIC)
43 endif(UNIX AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
46 # Link the boost.log library 47 # @todo consider an alternative to always linking boost log 48 ADD_DEFINITIONS(-DBOOST_LOG_DYN_LINK)
52 set(CMAKE_MACOSX_RPATH ON)
53 #
set(CMAKE_SKIP_BUILD_RPATH FALSE)
54 #set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) 55 #set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") 56 #set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) 57 #list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) 58 #if("${isSystemDir}" STREQUAL "-1") 59 # set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") 64 if(NOT ${OpenCV_VERSION} VERSION_LESS 3.0.0)
69 # list flatbuffer headers 70 set(RFB ArmControlState.fbs Geometry.fbs JointState.fbs KUKAiiwa.fbs LinkObject.fbs Euler.fbs Time.fbs VrepControlPoint.fbs VrepPath.fbs)
71 # directory to include flatbuffers
72 set(GRL_FLATBUFFERS_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include)
73 # Generate flatbuffer message C++ headers
75 add_custom_target(grlflatbuffers DEPENDS ${GRL_FLATBUFFERS_OUTPUTS})
78 # workaround so that compilation will work
if FindFRI-Client-SDK_Cpp is a module
79 # it may also be an external, see config/FindFRI-Client-SDK_Cpp
80 #
if(MODULE_FRI-Client-SDK_Cpp)
81 # set(FRI-Client-SDK_Cpp_LIBRARIES KukaFRIClient) 83 # if(NOT Nanopb_FOUND) 84 # set(Nanopb_LIBRARIES nanopb) 91 set(CISSTNETLIB_INCLUDE_DIRS ${CISSTNETLIB_INCLUDE_DIR})
include flatbuffers_generate_c_headers(GRL_FLATBUFFERS include/grl/flatbuffer/${GRL_FLATBUFFERS_INCLUDE_DIR}/grl/flatbuffer ${RFB}) add_custom_target(grlflatbuffers DEPENDS $
or our tests failed to detect it correctly Please use a different C compiler or report this problem to the developers endif() if(UNIX AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") endif(UNIX AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") if(APPLE) set(CMAKE_MACOSX_RPATH ON)() endif() if(OpenCV_FOUND) if(NOT $
VERSION_LESS add_definitions(-DHAVE_OPENCV3) endif() endif() set(RFB ArmControlState.fbs Geometry.fbs JointState.fbs KUKAiiwa.fbs LinkObject.fbs Euler.fbs Time.fbs VrepControlPoint.fbs VrepPath.fbs) set(GRL_FLATBUFFERS_INCLUDE_DIR $
basis_include_directories(${GRL_FLATBUFFERS_INCLUDE_DIR})() if(CISSTNETLIB_FOUND) set(CISSTNETLIB_INCLUDE_DIRS $
if(EXISTS "${PROJECT_DOC_DIR}/CMakeLists.txt") option(BUILD_DOCUMENTATION "Request build and/or installation of documentation." OFF) endif() if(EXISTS "$