fix compilation with newer CMake

It seems CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS on CMake 3.27 breaks
compilation on Windows.

The reason for it here is wrong: unit tests do not need non exported
symbols.
main
Rosen Penev 2 years ago
parent 4dfb78131c
commit 4d2d5f3673

@ -79,10 +79,6 @@ if ( EXIV2_ENABLE_EXTERNAL_XMP )
set(EXIV2_ENABLE_XMP OFF)
endif()
if(BUILD_TESTING AND EXIV2_BUILD_UNIT_TESTS)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) # Requires CMake 3.3.3
endif()
include(cmake/findDependencies.cmake REQUIRED)
include(cmake/compilerFlags.cmake REQUIRED)
include(cmake/generateConfigFile.cmake REQUIRED)

@ -1,9 +1,3 @@
# Note that this is a hack for testing the internals of the library. If EXIV2_BUILD_UNIT_TESTS==OFF
# Then we only export the symbols that are explicitly exported
if(BUILD_TESTING AND EXIV2_BUILD_UNIT_TESTS)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) # Requires CMake 3.3.3
endif()
include(CMakePackageConfigHelpers)
include_directories(${CMAKE_CURRENT_BINARY_DIR})

Loading…
Cancel
Save