From 13351f9371d22542803f3231f9690a8f6b578543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 5 Dec 2013 01:04:02 +0100 Subject: [PATCH] Install all *TestLib libraries on Windows. They are needed when running tests. --- src/Plugins/MagnumFont/CMakeLists.txt | 10 ++++++++++ src/Plugins/MagnumFontConverter/CMakeLists.txt | 10 ++++++++++ src/Plugins/TgaImageConverter/CMakeLists.txt | 10 ++++++++++ src/Plugins/TgaImporter/CMakeLists.txt | 10 ++++++++++ src/Plugins/WavAudioImporter/CMakeLists.txt | 10 ++++++++++ 5 files changed, 50 insertions(+) diff --git a/src/Plugins/MagnumFont/CMakeLists.txt b/src/Plugins/MagnumFont/CMakeLists.txt index 9ea4bb7a8..8c6a47117 100644 --- a/src/Plugins/MagnumFont/CMakeLists.txt +++ b/src/Plugins/MagnumFont/CMakeLists.txt @@ -46,5 +46,15 @@ install(FILES ${MagnumFont_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL if(BUILD_GL_TESTS) add_library(MagnumFontTestLib STATIC $) target_link_libraries(MagnumFontTestLib Magnum MagnumText TgaImporterTestLib) + + # 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 MagnumFontTestLib + RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR} + ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) + endif() + add_subdirectory(Test) endif() diff --git a/src/Plugins/MagnumFontConverter/CMakeLists.txt b/src/Plugins/MagnumFontConverter/CMakeLists.txt index f73442afb..5f590b7e8 100644 --- a/src/Plugins/MagnumFontConverter/CMakeLists.txt +++ b/src/Plugins/MagnumFontConverter/CMakeLists.txt @@ -46,5 +46,15 @@ install(FILES ${MagnumFontConverter_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUD if(BUILD_GL_TESTS) add_library(MagnumFontConverterTestLib STATIC $) target_link_libraries(MagnumFontConverterTestLib Magnum MagnumText TgaImageConverterTestLib) + + # 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 MagnumFontConverterTestLib + RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR} + ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) + endif() + add_subdirectory(Test) endif() diff --git a/src/Plugins/TgaImageConverter/CMakeLists.txt b/src/Plugins/TgaImageConverter/CMakeLists.txt index ddbb4149a..1efdd806e 100644 --- a/src/Plugins/TgaImageConverter/CMakeLists.txt +++ b/src/Plugins/TgaImageConverter/CMakeLists.txt @@ -42,5 +42,15 @@ install(FILES ${TgaImageConverter_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_ if(BUILD_TESTS) add_library(TgaImageConverterTestLib ${SHARED_OR_STATIC} $) target_link_libraries(TgaImageConverterTestLib 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 TgaImageConverterTestLib + RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR} + ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) + endif() + add_subdirectory(Test) endif() diff --git a/src/Plugins/TgaImporter/CMakeLists.txt b/src/Plugins/TgaImporter/CMakeLists.txt index 5f87fab56..2f893e5f0 100644 --- a/src/Plugins/TgaImporter/CMakeLists.txt +++ b/src/Plugins/TgaImporter/CMakeLists.txt @@ -43,5 +43,15 @@ install(FILES ${TgaImporter_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTAL if(BUILD_TESTS) add_library(TgaImporterTestLib ${SHARED_OR_STATIC} $) target_link_libraries(TgaImporterTestLib 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 TgaImporterTestLib + RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR} + ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) + endif() + add_subdirectory(Test) endif() diff --git a/src/Plugins/WavAudioImporter/CMakeLists.txt b/src/Plugins/WavAudioImporter/CMakeLists.txt index 477f04e53..a1a406d74 100644 --- a/src/Plugins/WavAudioImporter/CMakeLists.txt +++ b/src/Plugins/WavAudioImporter/CMakeLists.txt @@ -47,5 +47,15 @@ install(FILES ${WavAudioImporter_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_I if(BUILD_TESTS) add_library(WavAudioImporterTestLib STATIC $) target_link_libraries(WavAudioImporterTestLib Magnum MagnumAudio) + + # 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 WavAudioImporterTestLib + RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR} + ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) + endif() + add_subdirectory(Test) endif()