Browse Source

Install also test libs on Windows.

Resolves DLL hell when running tests.
pull/277/head
Vladimír Vondruš 13 years ago
parent
commit
17de6fe51b
  1. 6
      src/CMakeLists.txt
  2. 6
      src/MeshTools/CMakeLists.txt
  3. 6
      src/SceneGraph/CMakeLists.txt

6
src/CMakeLists.txt

@ -236,5 +236,11 @@ if(BUILD_TESTS)
set_target_properties(MagnumTestLib PROPERTIES COMPILE_FLAGS -DCORRADE_GRACEFUL_ASSERT)
target_link_libraries(MagnumTestLib ${Magnum_LIBS})
# On Windows we need to install first and then run the tests to avoid "DLL
# not found" hell, thus we need to install this too
if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
install(TARGETS MagnumMathTestLib MagnumTestLib DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})
endif()
add_subdirectory(Test)
endif()

6
src/MeshTools/CMakeLists.txt

@ -77,5 +77,11 @@ if(BUILD_TESTS)
set_target_properties(MagnumMeshToolsTestLib PROPERTIES COMPILE_FLAGS "-DCORRADE_GRACEFUL_ASSERT -DMagnumMeshTools_EXPORTS")
target_link_libraries(MagnumMeshToolsTestLib Magnum)
# On Windows we need to install first and then run the tests to avoid "DLL
# not found" hell, thus we need to install this too
if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
install(TARGETS MagnumMeshToolsTestLib DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})
endif()
add_subdirectory(Test)
endif()

6
src/SceneGraph/CMakeLists.txt

@ -92,5 +92,11 @@ if(BUILD_TESTS)
set_target_properties(MagnumSceneGraphTestLib PROPERTIES COMPILE_FLAGS "-DCORRADE_GRACEFUL_ASSERT -DMagnumSceneGraph_EXPORTS")
target_link_libraries(MagnumSceneGraphTestLib MagnumMathTestLib)
# On Windows we need to install first and then run the tests to avoid "DLL
# not found" hell, thus we need to install this too
if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
install(TARGETS MagnumSceneGraphTestLib DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})
endif()
add_subdirectory(Test)
endif()

Loading…
Cancel
Save