Browse Source

Build test libraries as static.

Removes the need to export symbols for plugins which otherwise don't
need that, we then also don't have to install the test library on
Windows.
pull/205/head
Vladimír Vondruš 12 years ago
parent
commit
b3b45507fe
  1. 11
      src/MagnumPlugins/AnyImageImporter/CMakeLists.txt

11
src/MagnumPlugins/AnyImageImporter/CMakeLists.txt

@ -53,17 +53,6 @@ install(FILES ${AnyImageImporter_HEADERS} DESTINATION ${MAGNUM_PLUGINS_INCLUDE_I
if(BUILD_TESTS)
add_library(MagnumAnyImageImporterTestLib STATIC $<TARGET_OBJECTS:AnyImageImporterObjects>)
set_target_properties(MagnumAnyImageImporterTestLib PROPERTIES DEBUG_POSTFIX "-d")
target_link_libraries(MagnumAnyImageImporterTestLib ${MAGNUM_LIBRARIES})
# 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(CORRADE_TARGET_WINDOWS AND NOT CMAKE_CROSSCOMPILING)
install(TARGETS MagnumAnyImageImporterTestLib
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}
ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})
endif()
add_subdirectory(Test)
endif()

Loading…
Cancel
Save