Skip to content

Commit

Permalink
CMake fixes (#358)
Browse files Browse the repository at this point in the history
* Add include(CMakePackageConfigHelpers)
* Use modern cmake target for ign-math

Signed-off-by: Juan Oxoby <juan@vicarious.com>

Co-authored-by: Juan Oxoby <juan@vicarious.com>
  • Loading branch information
joxoby and Juan Oxoby committed Sep 7, 2020
1 parent d02105e commit 5ed0a49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ else (build_errors)
set(sdf_version_output "cmake/${sdf_target}-config-version.cmake")
set(sdf_config_install_dir "${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME_LOWER}/")

include(CMakePackageConfigHelpers)
#--------------------------------------
# Configure and install the config file
configure_package_config_file(
Expand Down
3 changes: 1 addition & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ sdf_add_library(${sdf_target} ${sources})
target_compile_features(${sdf_target} PUBLIC cxx_std_17)
target_link_libraries(${sdf_target}
PUBLIC
${IGNITION-MATH_LIBRARIES}
ignition-math${IGN_MATH_VER}::ignition-math${IGN_MATH_VER}
PRIVATE
${TinyXML2_LIBRARIES})

Expand All @@ -185,7 +185,6 @@ endif()

target_include_directories(${sdf_target}
PUBLIC
${IGNITION-MATH_INCLUDE_DIRS}
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}/..>
)
Expand Down

0 comments on commit 5ed0a49

Please sign in to comment.