Skip to content

Commit

Permalink
Decouple linking to shlwapi from BUILD_TESTING
Browse files Browse the repository at this point in the history
The windows builds were broken with -DBUILD_TESTING=OFF,
so move the target_link_libraries call outside the
`if (BUILD_TESTING)` logical block.

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters committed Aug 19, 2024
1 parent 7404b55 commit cf1395e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
PRIVATE
TINYXML2::TINYXML2)

if (WIN32)
target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
PRIVATE shlwapi)
endif()

if (USE_INTERNAL_URDF)
target_include_directories(${PROJECT_LIBRARY_TARGET_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/urdf)
Expand Down Expand Up @@ -109,11 +114,6 @@ if (BUILD_TESTING)
-DGZ_SDFORMAT_STATIC_DEFINE
)

if(WIN32)
target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
PRIVATE shlwapi)
endif()

gz_build_tests(
TYPE UNIT
SOURCES ${gtest_sources}
Expand Down

0 comments on commit cf1395e

Please sign in to comment.