diff --git a/Sofa/framework/Simulation/Common/CMakeLists.txt b/Sofa/framework/Simulation/Common/CMakeLists.txt index 64a6c64e366..19ffb4de7c1 100644 --- a/Sofa/framework/Simulation/Common/CMakeLists.txt +++ b/Sofa/framework/Simulation/Common/CMakeLists.txt @@ -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)