Put all the CMake related with the exiv app together

This commit is contained in:
Luis Díaz Más 2017-08-17 20:25:40 +02:00 committed by Luis Diaz Mas
parent ee61c24459
commit 57cd78b517

View File

@ -187,31 +187,6 @@ ENDIF( EXIV2_ENABLE_PNG )
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
##
# Create source file lists for applications
# exiv2 application
SET( EXIV2_SRC exiv2.cpp
actions.cpp
utils.cpp
)
SET( EXIV2_HDR exiv2app.hpp
actions.hpp
utils.hpp
)
##
# modify source lists to suit environment
IF(NOT EXV_HAVE_TIMEGM )
SET( LIBEXIV2_SRC ${LIBEXIV2_SRC} localtime.c )
SET( EXIV2_SRC ${EXIV2_SRC} localtime.c )
SET( PATHTEST_SRC ${PATHTEST_SRC} localtime.c )
ENDIF()
IF( MSVC )
SET( EXIV2_SRC ${EXIV2_SRC} getopt_win32.c )
SET( LIBEXIV2_SRC ${LIBEXIV2_SRC} getopt_win32.c )
ENDIF( MSVC )
##
# msvn tuning
IF( MSVC )
@ -311,11 +286,38 @@ msvc_runtime_configure(${EXIV2_ENABLE_SHARED} ${EXIV2_ENABLE_DYNAMIC_RUNTIME})
# ******************************************************************************
# exiv2 application
ADD_EXECUTABLE( exiv2 ${EXIV2_SRC} ${EXIV2_HDR} )
TARGET_LINK_LIBRARIES( exiv2 exiv2lib ${LIBINTL_LIBRARIES} )
install(TARGETS exiv2
RUNTIME DESTINATION bin
)
##
# Create source file lists for applications
# exiv2 application
SET( EXIV2_SRC exiv2.cpp
actions.cpp
utils.cpp
)
SET( EXIV2_HDR exiv2app.hpp
actions.hpp
utils.hpp
)
##
# modify source lists to suit environment
IF(NOT EXV_HAVE_TIMEGM )
SET( LIBEXIV2_SRC ${LIBEXIV2_SRC} localtime.c )
SET( EXIV2_SRC ${EXIV2_SRC} localtime.c )
SET( PATHTEST_SRC ${PATHTEST_SRC} localtime.c )
ENDIF()
IF( MSVC )
SET( EXIV2_SRC ${EXIV2_SRC} getopt_win32.c )
SET( LIBEXIV2_SRC ${LIBEXIV2_SRC} getopt_win32.c )
ENDIF( MSVC )
add_executable( exiv2 ${EXIV2_SRC} ${EXIV2_HDR} )
target_link_libraries( exiv2 PRIVATE exiv2lib )
install(TARGETS exiv2 RUNTIME DESTINATION bin)
# TODO This should not be needed here! we need to fix the previous TODO
target_include_directories(exiv2 PRIVATE ${CMAKE_SOURCE_DIR}/include/)
# ******************************************************************************
# Man page