Closed clanmills closed 6 years ago
I think the code at CMakeLists.txt should be:
if( EXIV2_BUILD_SAMPLES )
##
# tests
add_custom_target(tests
COMMAND env EXIV2_BUILDDIR="${CMAKE_BINARY_DIR}" make test
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/test"
)
add_subdirectory( samples )
get_directory_property(SAMPLES DIRECTORY samples DEFINITION APPLICATIONS)
add_dependencies(tests exiv2lib exiv2 ${SAMPLES})
endif()
Here's the git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0df26204..cace079f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -111,23 +111,21 @@ if( EXIV2_BUILD_UNIT_TESTS )
endif()
if( EXIV2_BUILD_SAMPLES )
+ ##
+ # tests
+ add_custom_target(tests
+ COMMAND env EXIV2_BUILDDIR="${CMAKE_BINARY_DIR}" make test
+ WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/test"
+ )
add_subdirectory( samples )
+ get_directory_property(SAMPLES DIRECTORY samples DEFINITION APPLICATIONS)
+ add_dependencies(tests exiv2lib exiv2 ${SAMPLES})
endif()
if( EXIV2_BUILD_PO )
add_subdirectory( po )
endif()
-##
-# tests
-add_custom_target(tests
- COMMAND env EXIV2_BUILDDIR="${CMAKE_BINARY_DIR}" make test
- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/test"
-)
-
-get_directory_property(SAMPLES DIRECTORY samples DEFINITION APPLICATIONS)
-add_dependencies(tests exiv2lib exiv2 ${SAMPLES})
-
include(cmake/printSummary.cmake)
# That's all Folks!
I have a weirdo issue that has 100% broken contrib/cmake/msvc/cmakeBuild.cmd
I don't understand the following line of code:
The workaround is to comment off line 128 and 129, although presumably that has consequences for building SAMPLES.
I've modified/commented around it as follows:
When I run this:
When I build with conan:
So, the question is "What does DEFINITION APPLICATIONS mean"?
This is really strange. My
message
statements are pointing to the same directory. However, the output of the conan build reports-- sample: xxxx
which are missing when cmake is executed from cmakeBuild.cmd