Skip to content

Commit

Permalink
[Simulation.Common] Fix tinyXML2 install for windows (#4525)
Browse files Browse the repository at this point in the history
Fix tinyXML install for windows

Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>
  • Loading branch information
bakpaul and hugtalbot committed Feb 27, 2024
1 parent 6fab76a commit 3300c00
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sofa/framework/Simulation/Common/CMakeLists.txt
Expand Up @@ -41,7 +41,11 @@ sofa_find_package(Sofa.Core REQUIRED)
sofa_find_package(Sofa.Simulation.Core REQUIRED)
sofa_find_package(TinyXML2 REQUIRED)

sofa_install_libraries(PATHS ${TinyXML2_LIBRARY})
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
sofa_install_libraries(TARGETS tinyxml2::tinyxml2)
else()
sofa_install_libraries(PATHS ${TinyXML2_LIBRARY})
endif()

add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} PUBLIC Sofa.Core Sofa.Simulation.Core)
Expand Down

0 comments on commit 3300c00

Please sign in to comment.