Browse Source

Prefix plugin test libraries also with Magnum*.

They need to be installed into possibly system-wide location on Windows
and thus we need to avoid name clashes (or at least explicitly show that
e.g. TgaImporterTestLib.dll belongs to Magnum and is not any OMG virus).
pull/51/head
Vladimír Vondruš 12 years ago
parent
commit
52ab6a113b
  1. 6
      src/MagnumPlugins/MagnumFont/CMakeLists.txt
  2. 2
      src/MagnumPlugins/MagnumFont/Test/CMakeLists.txt
  3. 8
      src/MagnumPlugins/MagnumFontConverter/CMakeLists.txt
  4. 4
      src/MagnumPlugins/MagnumFontConverter/Test/CMakeLists.txt
  5. 6
      src/MagnumPlugins/ObjImporter/CMakeLists.txt
  6. 2
      src/MagnumPlugins/ObjImporter/Test/CMakeLists.txt
  7. 6
      src/MagnumPlugins/TgaImageConverter/CMakeLists.txt
  8. 2
      src/MagnumPlugins/TgaImageConverter/Test/CMakeLists.txt
  9. 6
      src/MagnumPlugins/TgaImporter/CMakeLists.txt
  10. 2
      src/MagnumPlugins/TgaImporter/Test/CMakeLists.txt
  11. 6
      src/MagnumPlugins/WavAudioImporter/CMakeLists.txt
  12. 2
      src/MagnumPlugins/WavAudioImporter/Test/CMakeLists.txt

6
src/MagnumPlugins/MagnumFont/CMakeLists.txt

@ -45,13 +45,13 @@ endif()
install(FILES ${MagnumFont_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/MagnumFont)
if(BUILD_GL_TESTS)
add_library(MagnumFontTestLib STATIC $<TARGET_OBJECTS:MagnumFontObjects>)
target_link_libraries(MagnumFontTestLib Magnum MagnumText TgaImporterTestLib)
add_library(MagnumMagnumFontTestLib STATIC $<TARGET_OBJECTS:MagnumFontObjects>)
target_link_libraries(MagnumMagnumFontTestLib Magnum MagnumText MagnumTgaImporterTestLib)
# 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
install(TARGETS MagnumMagnumFontTestLib
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}
ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})

2
src/MagnumPlugins/MagnumFont/Test/CMakeLists.txt

@ -28,4 +28,4 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
corrade_add_test(MagnumFontGLTest MagnumFontGLTest.cpp LIBRARIES MagnumFontTestLib ${GL_TEST_LIBRARIES})
corrade_add_test(MagnumFontGLTest MagnumFontGLTest.cpp LIBRARIES MagnumMagnumFontTestLib ${GL_TEST_LIBRARIES})

8
src/MagnumPlugins/MagnumFontConverter/CMakeLists.txt

@ -39,19 +39,19 @@ add_plugin(MagnumFontConverter ${MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_INSTALL_DIR}
target_link_libraries(MagnumFontConverter Magnum MagnumText)
if(WIN32)
target_link_libraries(MagnumFontConverter TgaImageConverter)
target_link_libraries(MagnumFontConverter MagnumTgaImageConverter)
endif()
install(FILES ${MagnumFontConverter_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/MagnumFontConverter)
if(BUILD_GL_TESTS)
add_library(MagnumFontConverterTestLib STATIC $<TARGET_OBJECTS:MagnumFontConverterObjects>)
target_link_libraries(MagnumFontConverterTestLib Magnum MagnumText TgaImageConverterTestLib)
add_library(MagnumMagnumFontConverterTestLib STATIC $<TARGET_OBJECTS:MagnumFontConverterObjects>)
target_link_libraries(MagnumMagnumFontConverterTestLib Magnum MagnumText MagnumTgaImageConverterTestLib)
# 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
install(TARGETS MagnumMagnumFontConverterTestLib
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}
ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})

4
src/MagnumPlugins/MagnumFontConverter/Test/CMakeLists.txt

@ -29,6 +29,6 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
corrade_add_test(MagnumFontConverterGLTest MagnumFontConverterGLTest.cpp LIBRARIES
MagnumFontConverterTestLib
TgaImporterTestLib
MagnumMagnumFontConverterTestLib
MagnumTgaImporterTestLib
${GL_TEST_LIBRARIES})

6
src/MagnumPlugins/ObjImporter/CMakeLists.txt

@ -37,13 +37,13 @@ target_link_libraries(ObjImporter Magnum MagnumMeshTools)
install(FILES ObjImporter.h DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/ObjImporter)
if(BUILD_TESTS)
add_library(ObjImporterTestLib STATIC $<TARGET_OBJECTS:ObjImporterObjects>)
target_link_libraries(ObjImporterTestLib Magnum MagnumMeshTools)
add_library(MagnumObjImporterTestLib STATIC $<TARGET_OBJECTS:ObjImporterObjects>)
target_link_libraries(MagnumObjImporterTestLib Magnum MagnumMeshTools)
# 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 ObjImporterTestLib
install(TARGETS MagnumObjImporterTestLib
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}
ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})

2
src/MagnumPlugins/ObjImporter/Test/CMakeLists.txt

@ -28,4 +28,4 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
corrade_add_test(ObjImporterTest Test.cpp LIBRARIES ObjImporterTestLib)
corrade_add_test(ObjImporterTest Test.cpp LIBRARIES MagnumObjImporterTestLib)

6
src/MagnumPlugins/TgaImageConverter/CMakeLists.txt

@ -41,13 +41,13 @@ target_link_libraries(TgaImageConverter Magnum)
install(FILES ${TgaImageConverter_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/TgaImageConverter)
if(BUILD_TESTS)
add_library(TgaImageConverterTestLib ${SHARED_OR_STATIC} $<TARGET_OBJECTS:TgaImageConverterObjects>)
target_link_libraries(TgaImageConverterTestLib Magnum)
add_library(MagnumTgaImageConverterTestLib ${SHARED_OR_STATIC} $<TARGET_OBJECTS:TgaImageConverterObjects>)
target_link_libraries(MagnumTgaImageConverterTestLib 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
install(TARGETS MagnumTgaImageConverterTestLib
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}
ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})

2
src/MagnumPlugins/TgaImageConverter/Test/CMakeLists.txt

@ -28,4 +28,4 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
corrade_add_test(TgaImageConverterTest TgaImageConverterTest.cpp LIBRARIES TgaImageConverterTestLib TgaImporterTestLib)
corrade_add_test(TgaImageConverterTest TgaImageConverterTest.cpp LIBRARIES MagnumTgaImageConverterTestLib MagnumTgaImporterTestLib)

6
src/MagnumPlugins/TgaImporter/CMakeLists.txt

@ -42,13 +42,13 @@ target_link_libraries(TgaImporter Magnum)
install(FILES ${TgaImporter_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/TgaImporter)
if(BUILD_TESTS)
add_library(TgaImporterTestLib ${SHARED_OR_STATIC} $<TARGET_OBJECTS:TgaImporterObjects>)
target_link_libraries(TgaImporterTestLib Magnum)
add_library(MagnumTgaImporterTestLib ${SHARED_OR_STATIC} $<TARGET_OBJECTS:TgaImporterObjects>)
target_link_libraries(MagnumTgaImporterTestLib 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
install(TARGETS MagnumTgaImporterTestLib
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}
ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})

2
src/MagnumPlugins/TgaImporter/Test/CMakeLists.txt

@ -28,4 +28,4 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
corrade_add_test(TgaImporterTest TgaImporterTest.cpp LIBRARIES TgaImporterTestLib)
corrade_add_test(TgaImporterTest TgaImporterTest.cpp LIBRARIES MagnumTgaImporterTestLib)

6
src/MagnumPlugins/WavAudioImporter/CMakeLists.txt

@ -48,13 +48,13 @@ target_link_libraries(WavAudioImporter Magnum MagnumAudio)
install(FILES ${WavAudioImporter_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR}/WavAudioImporter)
if(BUILD_TESTS)
add_library(WavAudioImporterTestLib STATIC $<TARGET_OBJECTS:WavAudioImporterObjects>)
target_link_libraries(WavAudioImporterTestLib Magnum MagnumAudio)
add_library(MagnumWavAudioImporterTestLib STATIC $<TARGET_OBJECTS:WavAudioImporterObjects>)
target_link_libraries(MagnumWavAudioImporterTestLib 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
install(TARGETS MagnumWavAudioImporterTestLib
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}
ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})

2
src/MagnumPlugins/WavAudioImporter/Test/CMakeLists.txt

@ -28,4 +28,4 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
corrade_add_test(WavAudioImporterTest WavImporterTest.cpp LIBRARIES WavAudioImporterTestLib)
corrade_add_test(WavAudioImporterTest WavImporterTest.cpp LIBRARIES MagnumWavAudioImporterTestLib)

Loading…
Cancel
Save