diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 57dab8757..6a7be941e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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) @@ -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}