Skip to content

Commit

Permalink
CMake: example-robot-data is included in public header
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Apr 6, 2022
1 parent 5bb2e3f commit 3184adf
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ endif()

# JRL-cmakemodule setup
include("${JRL_CMAKE_MODULES}/base.cmake")
include("${JRL_CMAKE_MODULES}/boost.cmake")
include("${JRL_CMAKE_MODULES}/test.cmake")
# ##############################################################################

# Project definition
Expand All @@ -41,9 +39,9 @@ project(aig ${PROJECT_ARGS})

# Dependencies
add_project_dependency(pinocchio REQUIRED)
add_project_dependency(example-robot-data REQUIRED)
if(BUILD_TESTING)
find_package(Boost REQUIRED COMPONENTS unit_test_framework)
add_project_dependency(example-robot-data REQUIRED)
endif()

# Main library
Expand All @@ -60,7 +58,8 @@ set(${PROJECT_NAME}_SOURCES
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
target_include_directories(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
target_link_libraries(${PROJECT_NAME} PUBLIC pinocchio::pinocchio)
target_link_libraries(${PROJECT_NAME} PUBLIC
pinocchio::pinocchio example-robot-data::example-robot-data)
if(SUFFIX_SO_VERSION)
set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})
endif()
Expand All @@ -86,9 +85,9 @@ if(BUILD_TESTING)
foreach(unittest_name ${${PROJECT_NAME}_CPP_TESTS})
add_unit_test(${unittest_name} tests/${unittest_name}.cpp)
target_link_libraries(${unittest_name} ${PROJECT_NAME}
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
target_compile_definitions(${unittest_name}
PUBLIC "-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN")
Boost::unit_test_framework)
target_compile_definitions(${unittest_name} PUBLIC
"-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN")
endforeach()
endif()

Expand Down

0 comments on commit 3184adf

Please sign in to comment.