Browse Source

Adapt to changes to executable symbol defaults in CMake 3.4.

findsdl-include-root
Vladimír Vondruš 7 years ago
parent
commit
ef725cdbcf
  1. 9
      src/Magnum/DebugTools/Test/CMakeLists.txt
  2. 7
      src/MagnumPlugins/AnyAudioImporter/Test/CMakeLists.txt
  3. 7
      src/MagnumPlugins/AnyImageConverter/Test/CMakeLists.txt
  4. 7
      src/MagnumPlugins/AnyImageImporter/Test/CMakeLists.txt
  5. 7
      src/MagnumPlugins/AnySceneImporter/Test/CMakeLists.txt
  6. 15
      src/MagnumPlugins/MagnumFont/Test/CMakeLists.txt
  7. 7
      src/MagnumPlugins/MagnumFontConverter/Test/CMakeLists.txt
  8. 7
      src/MagnumPlugins/ObjImporter/Test/CMakeLists.txt
  9. 7
      src/MagnumPlugins/TgaImageConverter/Test/CMakeLists.txt
  10. 7
      src/MagnumPlugins/TgaImporter/Test/CMakeLists.txt
  11. 9
      src/MagnumPlugins/WavAudioImporter/Test/CMakeLists.txt

9
src/Magnum/DebugTools/Test/CMakeLists.txt

@ -123,6 +123,15 @@ if(TARGET_GL)
target_link_libraries(DebugToolsScreenshotGLTest PRIVATE TgaImporter)
endif()
endif()
if(CORRADE_BUILD_STATIC AND NOT BUILD_PLUGINS_STATIC)
# CMake < 3.4 does this implicitly, but 3.4+ not anymore (see
# CMP0065). That's generally okay, *except if* the build is
# static, the executable uses a plugin manager and needs to
# share globals with the plugins (such as output redirection
# and so on).
set_target_properties(DebugToolsScreenshotGLTest PROPERTIES ENABLE_EXPORTS ON)
endif()
endif()
if(WITH_SCENEGRAPH AND WITH_TRADE)

7
src/MagnumPlugins/AnyAudioImporter/Test/CMakeLists.txt

@ -58,3 +58,10 @@ if(BUILD_PLUGINS_STATIC)
endif()
endif()
set_target_properties(AnyAudioImporterTest PROPERTIES FOLDER "MagnumPlugins/AnyAudioImporter/Test")
if(CORRADE_BUILD_STATIC AND NOT BUILD_PLUGINS_STATIC)
# CMake < 3.4 does this implicitly, but 3.4+ not anymore (see CMP0065).
# That's generally okay, *except if* the build is static, the executable
# uses a plugin manager and needs to share globals with the plugins (such
# as output redirection and so on).
set_target_properties(AnyAudioImporterTest PROPERTIES ENABLE_EXPORTS ON)
endif()

7
src/MagnumPlugins/AnyImageConverter/Test/CMakeLists.txt

@ -56,3 +56,10 @@ if(BUILD_PLUGINS_STATIC)
endif()
endif()
set_target_properties(AnyImageConverterTest PROPERTIES FOLDER "MagnumPlugins/AnyImageConverter/Test")
if(CORRADE_BUILD_STATIC AND NOT BUILD_PLUGINS_STATIC)
# CMake < 3.4 does this implicitly, but 3.4+ not anymore (see CMP0065).
# That's generally okay, *except if* the build is static, the executable
# uses a plugin manager and needs to share globals with the plugins (such
# as output redirection and so on).
set_target_properties(AnyImageConverterTest PROPERTIES ENABLE_EXPORTS ON)
endif()

7
src/MagnumPlugins/AnyImageImporter/Test/CMakeLists.txt

@ -66,3 +66,10 @@ if(BUILD_PLUGINS_STATIC)
endif()
endif()
set_target_properties(AnyImageImporterTest PROPERTIES FOLDER "MagnumPlugins/AnyImageImporter/Test")
if(CORRADE_BUILD_STATIC AND NOT BUILD_PLUGINS_STATIC)
# CMake < 3.4 does this implicitly, but 3.4+ not anymore (see CMP0065).
# That's generally okay, *except if* the build is static, the executable
# uses a plugin manager and needs to share globals with the plugins (such
# as output redirection and so on).
set_target_properties(AnyImageImporterTest PROPERTIES ENABLE_EXPORTS ON)
endif()

7
src/MagnumPlugins/AnySceneImporter/Test/CMakeLists.txt

@ -58,3 +58,10 @@ if(BUILD_PLUGINS_STATIC)
endif()
endif()
set_target_properties(AnySceneImporterTest PROPERTIES FOLDER "MagnumPlugins/AnySceneImporter/Test")
if(CORRADE_BUILD_STATIC AND NOT BUILD_PLUGINS_STATIC)
# CMake < 3.4 does this implicitly, but 3.4+ not anymore (see CMP0065).
# That's generally okay, *except if* the build is static, the executable
# uses a plugin manager and needs to share globals with the plugins (such
# as output redirection and so on).
set_target_properties(AnySceneImporterTest PROPERTIES ENABLE_EXPORTS ON)
endif()

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

@ -54,6 +54,13 @@ if(BUILD_PLUGINS_STATIC)
target_link_libraries(MagnumFontTest PRIVATE MagnumFont TgaImporter)
endif()
set_target_properties(MagnumFontTest PROPERTIES FOLDER "MagnumPlugins/MagnumFont/Test")
if(CORRADE_BUILD_STATIC AND NOT BUILD_PLUGINS_STATIC)
# CMake < 3.4 does this implicitly, but 3.4+ not anymore (see CMP0065).
# That's generally okay, *except if* the build is static, the executable
# uses a plugin manager and needs to share globals with the plugins (such
# as output redirection and so on).
set_target_properties(MagnumFontTest PROPERTIES ENABLE_EXPORTS ON)
endif()
if(BUILD_GL_TESTS)
corrade_add_test(MagnumFontGLTest MagnumFontGLTest.cpp
@ -66,4 +73,12 @@ if(BUILD_GL_TESTS)
target_link_libraries(MagnumFontGLTest PRIVATE MagnumFont TgaImporter)
endif()
set_target_properties(MagnumFontGLTest PROPERTIES FOLDER "MagnumPlugins/MagnumFont/Test")
if((CORRADE_BUILD_STATIC OR MAGNUM_BUILD_STATIC) AND NOT BUILD_PLUGINS_STATIC)
# CMake < 3.4 does this implicitly, but 3.4+ not anymore (see CMP0065).
# That's generally okay, *except if* the build is static, the
# executable uses a plugin manager and needs to share globals with the
# plugins (such as output redirection, GL::Context::current() and so
# on).
set_target_properties(MagnumFontGLTest PROPERTIES ENABLE_EXPORTS ON)
endif()
endif()

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

@ -52,3 +52,10 @@ if(BUILD_PLUGINS_STATIC)
endif()
endif()
set_target_properties(MagnumFontConverterTest PROPERTIES FOLDER "MagnumPlugins/MagnumFontConverter/Test")
if(CORRADE_BUILD_STATIC AND NOT BUILD_PLUGINS_STATIC)
# CMake < 3.4 does this implicitly, but 3.4+ not anymore (see CMP0065).
# That's generally okay, *except if* the build is static, the executable
# uses a plugin manager and needs to share globals with the plugins (such
# as output redirection and so on).
set_target_properties(MagnumFontConverterTest PROPERTIES ENABLE_EXPORTS ON)
endif()

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

@ -68,3 +68,10 @@ if(BUILD_PLUGINS_STATIC)
target_link_libraries(ObjImporterTest PRIVATE ObjImporter)
endif()
set_target_properties(ObjImporterTest PROPERTIES FOLDER "MagnumPlugins/ObjImporter/Test")
if(CORRADE_BUILD_STATIC AND NOT BUILD_PLUGINS_STATIC)
# CMake < 3.4 does this implicitly, but 3.4+ not anymore (see CMP0065).
# That's generally okay, *except if* the build is static, the executable
# uses a plugin manager and needs to share globals with the plugins (such
# as output redirection and so on).
set_target_properties(ObjImporterTest PROPERTIES ENABLE_EXPORTS ON)
endif()

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

@ -50,3 +50,10 @@ if(BUILD_PLUGINS_STATIC)
endif()
endif()
set_target_properties(TgaImageConverterTest PROPERTIES FOLDER "MagnumPlugins/TgaImageConverter/Test")
if(CORRADE_BUILD_STATIC AND NOT BUILD_PLUGINS_STATIC)
# CMake < 3.4 does this implicitly, but 3.4+ not anymore (see CMP0065).
# That's generally okay, *except if* the build is static, the executable
# uses a plugin manager and needs to share globals with the plugins (such
# as output redirection and so on).
set_target_properties(TgaImageConverterTest PROPERTIES ENABLE_EXPORTS ON)
endif()

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

@ -51,3 +51,10 @@ if(BUILD_PLUGINS_STATIC)
target_link_libraries(TgaImporterTest PRIVATE TgaImporter)
endif()
set_target_properties(TgaImporterTest PROPERTIES FOLDER "MagnumPlugins/TgaImporter/Test")
if(CORRADE_BUILD_STATIC AND NOT BUILD_PLUGINS_STATIC)
# CMake < 3.4 does this implicitly, but 3.4+ not anymore (see CMP0065).
# That's generally okay, *except if* the build is static, the executable
# uses a plugin manager and needs to share globals with the plugins (such
# as output redirection and so on).
set_target_properties(TgaImporterTest PROPERTIES ENABLE_EXPORTS ON)
endif()

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

@ -84,13 +84,18 @@ target_include_directories(WavAudioImporterTest PRIVATE ${CMAKE_CURRENT_BINARY_D
if(BUILD_PLUGINS_STATIC)
target_link_libraries(WavAudioImporterTest PRIVATE WavAudioImporter)
endif()
corrade_add_test(WavAudioImporterWavHeaderTest
WavHeaderTest.cpp
$<TARGET_OBJECTS:WavAudioImporterObjects>
LIBRARIES MagnumAudio)
set_target_properties(
WavAudioImporterTest
WavAudioImporterWavHeaderTest
PROPERTIES FOLDER "MagnumPlugins/WavAudioImporter/Test")
if(CORRADE_BUILD_STATIC AND NOT BUILD_PLUGINS_STATIC)
# CMake < 3.4 does this implicitly, but 3.4+ not anymore (see CMP0065).
# That's generally okay, *except if* the build is static, the executable
# uses a plugin manager and needs to share globals with the plugins (such
# as output redirection and so on).
set_target_properties(WavAudioImporterTest PROPERTIES ENABLE_EXPORTS ON)
endif()

Loading…
Cancel
Save