exv_conf.h is now generated in the CMAKE_BINARY_DIR to not mess up the source tree.

v0.27.3
Luis Díaz Más 8 years ago
parent c319016a58
commit df899bfbc3

@ -6,17 +6,6 @@
# Redistribution and use is allowed according to the terms of the BSD license. # Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
##
# Running cmake in a tree in which we have run ./configure ; make
# creates include/exiv2/exv_conf.h which conflicts with cmake's own exv_conf.h
# This causes incorrect compilation and linking errors.
#
# It's OK to delete this as it will be recreated on demand by <exiv2-dir>/Makefile
if( EXISTS "${CMAKE_SOURCE_DIR}/include/exiv2/exv_conf.h" )
file(REMOVE "${CMAKE_SOURCE_DIR}/include/exiv2/exv_conf.h")
endif()
##
CMAKE_MINIMUM_REQUIRED( VERSION 3.1.0 ) CMAKE_MINIMUM_REQUIRED( VERSION 3.1.0 )
PROJECT( exiv2 ) PROJECT( exiv2 )
@ -118,6 +107,8 @@ IF( EXIV2_ENABLE_XMP )
ENDIF( EXIV2_ENABLE_XMP ) ENDIF( EXIV2_ENABLE_XMP )
include( config/generateConfigFile.cmake ) include( config/generateConfigFile.cmake )
include_directories(${CMAKE_BINARY_DIR}) # Make the exv_conf.h file visible for the full project
include( config/CMakeChecks.txt ) include( config/CMakeChecks.txt )
SET( INSTALL_TARGET_STANDARD_ARGS SET( INSTALL_TARGET_STANDARD_ARGS

@ -64,5 +64,4 @@ return 0;
##################################################################################### #####################################################################################
configure_file( config/config.h.cmake ${CMAKE_SOURCE_DIR}/include/exiv2/exv_conf.h @ONLY) configure_file( config/config.h.cmake ${CMAKE_BINARY_DIR}/exv_conf.h @ONLY)
#configure_file( config/config.h.cmake ${CMAKE_SOURCE_DIR}/include/exiv2/exv_conf.h)

Loading…
Cancel
Save