Fix CMakeLists.txt to not be platform specific

- Additionally, use the boost macro to properly find its library
This commit is contained in:
Dustin Spicuzza
2014-11-15 20:19:51 -05:00
committed by Peter Johnson
parent c7a90b2ccc
commit 6234fe06f5
8 changed files with 24 additions and 16 deletions

View File

@@ -7,11 +7,12 @@ if (PKG_CONFIG_FOUND)
endif()
find_package(gazebo REQUIRED)
find_library(GZ_MSGS libgz_msgs.so ../msgs/build)
find_package(Boost COMPONENTS system REQUIRED)
find_library(GZ_MSGS NAMES gz_msgs PATHS ../msgs/build)
file(GLOB_RECURSE SRC_FILES src/*.cpp)
include_directories(src ${Boost_INCLUDE_DIR} ${GAZEBO_INCLUDE_DIRS} ../msgs/src)
add_library(${PROJECT_NAME} SHARED ${SRC_FILES})
link_directories(${GAZEBO_LIBRARY_DIRS} ../msgs/build/)
target_link_libraries(${PROJECT_NAME} ${GZ_MSGS} ${GAZEBO_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${GZ_MSGS} ${GAZEBO_LIBRARIES} ${Boost_LIBRARIES})