Looking better all the time, Gentlemen. I believe the only changes between the patches are in unitTests/CMakeLists.txt.

This build passes the test suite and jens.cpp on MacOS-X.  I'll submit and see what the CI has to say.  With the changes only relating to unitTests (which I didn't run on FreeBSD), we should not have disturbed Linux/FreeBSD/jens.cpp.
v0.27.3
Robin Mills 6 years ago committed by Luis Díaz Más
parent 76d2798172
commit 0c282f8373

@ -1,5 +1,22 @@
find_package(GTest REQUIRED)
get_target_property(exiv2lib_SOURCES exiv2lib SOURCES)
get_target_property(exiv2lib_int_SOURCES exiv2lib_int SOURCES)
get_target_property(exiv2lib_COMPILE_DEFINITIONS exiv2lib COMPILE_DEFINITIONS)
get_target_property(exiv2lib_INCLUDE_DIRECTORIES exiv2lib INCLUDE_DIRECTORIES)
get_target_property(exiv2lib_LINK_LIBRARIES exiv2lib LINK_LIBRARIES)
set(unit_tests_exiv2lib_SOURCES)
foreach(source IN LISTS exiv2lib_SOURCES exiv2lib_int_SOURCES)
if(source MATCHES "\.(c|cpp|h|hpp)$")
if(source MATCHES ".*/.*")
list(APPEND unit_tests_exiv2lib_SOURCES "${source}")
else()
list(APPEND unit_tests_exiv2lib_SOURCES "../src/${source}")
endif()
endif()
endforeach()
add_executable(unit_tests mainTestRunner.cpp
gtestwrapper.h
test_types.cpp
@ -14,13 +31,24 @@ add_executable(unit_tests mainTestRunner.cpp
test_helper_functions.cpp
test_slice.cpp
test_image_int.cpp
$<TARGET_OBJECTS:exiv2lib_int>
${unit_tests_exiv2lib_SOURCES}
)
target_compile_definitions(unit_tests
PRIVATE
exiv2lib_STATIC
${exiv2lib_COMPILE_DEFINITIONS}
)
target_include_directories(unit_tests
PRIVATE
${exiv2lib_INCLUDE_DIRECTORIES}
)
#TODO Use GTest::GTest once we upgrade the minimum CMake version required
target_link_libraries(unit_tests
PRIVATE
exiv2lib
${exiv2lib_LINK_LIBRARIES}
${GTEST_BOTH_LIBRARIES}
)
@ -50,4 +78,4 @@ endif()
if (MSVC)
set_target_properties(unit_tests PROPERTIES LINK_FLAGS "/ignore:4099")
endif()
endif()

Loading…
Cancel
Save