From 06b20523f732ca5af6b749758c42a808bcf2ce65 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Mon, 21 Aug 2017 00:45:42 +0200 Subject: [PATCH 1/5] Lowercase if/else/endif/foreach/endforeach --- CMakeLists.txt | 29 ++++++++++++++--------------- config/CMakeChecks.txt | 14 +++++++------- src/CMakeLists.txt | 22 +++++++++++----------- 3 files changed, 32 insertions(+), 33 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d56ce5b7..6519dc97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,32 +43,31 @@ OPTION( EXIV2_ENABLE_BUILD_PO "Build translations files" OPTION( EXIV2_ENABLE_VIDEO "Build video support into library" OFF ) OPTION( EXIV2_ENABLE_WEBREADY "Build webready support into library" OFF ) OPTION( EXIV2_ENABLE_DYNAMIC_RUNTIME "Use dynamic runtime (used for static libs)" OFF ) -IF (WIN32) +if (WIN32) OPTION( EXIV2_ENABLE_WIN_UNICODE "Use Unicode paths (wstring) on Windows" OFF ) OPTION( EXIV2_ENABLE_CURL "USE Libcurl for HttpIo" OFF ) OPTION( EXIV2_ENABLE_SSH "USE Libssh for SshIo" OFF ) -ELSE() +else() OPTION( EXIV2_ENABLE_CURL "USE Libcurl for HttpIo" ON ) OPTION( EXIV2_ENABLE_SSH "USE Libssh for SshIo" ON ) -ENDIF() +endif() OPTION( EXIV2_ENABLE_TOOLS "Build exiv2 executable" ON ) include(config/findDependencies.cmake) include(config/compilerFlags.cmake) - -IF( EXIV2_ENABLE_COMMERCIAL ) +if( EXIV2_ENABLE_COMMERCIAL ) SET (EXIV2_ENABLE_LENSDATA OFF) SET (EXIV2_ENABLE_NLS OFF) -ENDIF() +endif() if( MSVC ) set(CMAKE_DEBUG_POSTFIX "d") -endif( MSVC ) +endif() -IF( EXIV2_ENABLE_XMP ) +if( EXIV2_ENABLE_XMP ) SET( HAVE_XMP_TOOLKIT ON ) -ENDIF( EXIV2_ENABLE_XMP ) +endif() include( config/generateConfigFile.cmake ) include_directories(${CMAKE_BINARY_DIR}) # Make the exv_conf.h file visible for the full project @@ -80,13 +79,13 @@ if( EXIV2_ENABLE_XMP ) endif() ADD_SUBDIRECTORY( src ) -IF( EXIV2_ENABLE_BUILD_SAMPLES ) +if( EXIV2_ENABLE_BUILD_SAMPLES ) ADD_SUBDIRECTORY( samples ) -ENDIF( EXIV2_ENABLE_BUILD_SAMPLES ) +endif() -IF( EXIV2_ENABLE_BUILD_PO ) +if( EXIV2_ENABLE_BUILD_PO ) ADD_SUBDIRECTORY( po ) -ENDIF( EXIV2_ENABLE_BUILD_PO ) +endif() ## # tests @@ -98,12 +97,12 @@ ADD_CUSTOM_TARGET(geotag-test COMMAND env EXIV2_BINDIR="${CMAKE_BINARY_DIR}"/bin # effectively does a make doc on the root directory # has to run 'make config' and './configure' # and copy bin/taglist to /bin/taglist for use by 'make doc' -IF( MINGW OR UNIX OR APPLE) +if( MINGW OR UNIX OR APPLE) ADD_CUSTOM_TARGET(doc WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/doc" COMMAND chmod +x ./cmake_doc.sh COMMAND ./cmake_doc.sh "${CMAKE_BINARY_DIR}" ) -ENDIF() +endif() INCLUDE( config/printSummary.cmake ) diff --git a/config/CMakeChecks.txt b/config/CMakeChecks.txt index f53f9e56..ef474d9b 100644 --- a/config/CMakeChecks.txt +++ b/config/CMakeChecks.txt @@ -31,24 +31,24 @@ # # ConfigureChecks for exiv2 -IF( EXIV2_ENABLE_SHARED ) +if( EXIV2_ENABLE_SHARED ) ADD_DEFINITIONS( -DEXV_HAVE_DLL ) SET( STATIC_FLAG SHARED ) -ELSE( EXIV2_ENABLE_SHARED ) +else() SET( STATIC_FLAG STATIC ) -ENDIF( EXIV2_ENABLE_SHARED ) +endif() -IF( EXIV2_ENABLE_COMMERCIAL ) +if( EXIV2_ENABLE_COMMERCIAL ) ADD_DEFINITIONS( -DEXV_COMMERCIAL_VERSION ) -ENDIF( EXIV2_ENABLE_COMMERCIAL ) +endif() CONFIGURE_FILE(config/exiv2_uninstall.cmake ${CMAKE_BINARY_DIR}/cmake_uninstall.cmake COPYONLY) ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake") -IF( NOT MSVC ) +if( NOT MSVC ) CONFIGURE_FILE( config/exiv2.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/exiv2.pc @ONLY ) INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) CONFIGURE_FILE( config/exiv2.lsm.cmake ${CMAKE_CURRENT_BINARY_DIR}/exiv2.lsm) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2.lsm DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) -ENDIF( NOT MSVC ) +endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 45950cae..f7fd7844 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -151,7 +151,7 @@ if( EXIV2_ENABLE_WEBREADY ) set( LIBEXIV2_SRC ${LIBEXIV2_SRC} ssh.cpp) set( LIBEXIV2_HDR ${LIBEXIV2_HDR} ../include/exiv2/ssh.hpp) endif() -endif( EXIV2_ENABLE_WEBREADY ) +endif() ## # add png*.cpp files if PNG support requested @@ -187,7 +187,7 @@ endif() if ( EXIV2_ENABLE_XMP ) target_include_directories(exiv2lib PRIVATE ${CMAKE_SOURCE_DIR}/xmpsdk/include) -endif () +endif() # TODO : We should not include include/exiv2 but only include !!! target_include_directories(exiv2lib PUBLIC @@ -226,23 +226,23 @@ endif() if( EXIV2_ENABLE_XMP AND EXIV2_ENABLE_LIBXMP ) TARGET_LINK_LIBRARIES( exiv2lib PUBLIC xmp ) -ENDIF() +endif() -IF( EXIV2_ENABLE_PNG ) +if( EXIV2_ENABLE_PNG ) TARGET_LINK_LIBRARIES( exiv2lib PRIVATE ${ZLIB_LIBRARIES} ) -ENDIF() +endif() -IF( EXIV2_ENABLE_NLS ) +if( EXIV2_ENABLE_NLS ) TARGET_LINK_LIBRARIES( exiv2lib PRIVATE ${LIBINTL_LIBRARIES} ) -ENDIF( EXIV2_ENABLE_NLS ) +endif() -IF( ICONV_FOUND ) +if( ICONV_FOUND ) TARGET_LINK_LIBRARIES( exiv2lib PRIVATE ${ICONV_LIBRARIES} ) -ENDIF( ICONV_FOUND ) +endif() -IF (CYGWIN OR MINGW) +if (CYGWIN OR MINGW) TARGET_LINK_LIBRARIES( exiv2lib PRIVATE psapi ws2_32 ) -ENDIF(CYGWIN OR MINGW) +endif() install(TARGETS exiv2lib RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} From 40565761d1ac2010dbe8e8c9948a3210d807067f Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Mon, 21 Aug 2017 01:00:52 +0200 Subject: [PATCH 2/5] Lowercase add_{definitions,subdirectory}, set{_*} and option macros --- CMakeLists.txt | 70 +++++++++++++++++++++--------------------- config/CMakeChecks.txt | 8 ++--- samples/CMakeLists.txt | 2 +- src/CMakeLists.txt | 8 ++--- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6519dc97..dfc8fbe9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,46 +19,46 @@ endif() set(CMAKE_MACOSX_RPATH 1) -SET( PACKAGE_COPYRIGHT "Andreas Huggel" ) -SET( PACKAGE_BUGREPORT "http://github.com/exiv2/exiv2" ) -SET( PACKAGE "exiv2" ) -SET( PACKAGE_NAME "exiv2" ) -SET( PACKAGE_VERSION "0.26" ) -SET( PACKAGE_URL "http://www.exiv2.org" ) -SET( PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}" ) -SET( GENERIC_LIB_VERSION "26.0.0" ) -SET( GENERIC_LIB_SOVERSION "26" ) +set( PACKAGE_COPYRIGHT "Andreas Huggel" ) +set( PACKAGE_BUGREPORT "http://github.com/exiv2/exiv2" ) +set( PACKAGE "exiv2" ) +set( PACKAGE_NAME "exiv2" ) +set( PACKAGE_VERSION "0.26" ) +set( PACKAGE_URL "http://www.exiv2.org" ) +set( PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}" ) +set( GENERIC_LIB_VERSION "26.0.0" ) +set( GENERIC_LIB_SOVERSION "26" ) # options and their default values -OPTION( EXIV2_ENABLE_SHARED "Build exiv2 as a shared library (dll)" ON ) -OPTION( EXIV2_ENABLE_XMP "Build with XMP metadata support" ON ) -OPTION( EXIV2_ENABLE_LIBXMP "Build a static convenience Library for XMP" ON ) -OPTION( EXIV2_ENABLE_PNG "Build with png support (requires libz)" ON ) -OPTION( EXIV2_ENABLE_NLS "Build native language support (requires gettext)" ON ) -OPTION( EXIV2_ENABLE_PRINTUCS2 "Build with Printucs2" ON ) -OPTION( EXIV2_ENABLE_LENSDATA "Build including lens data" ON ) -OPTION( EXIV2_ENABLE_COMMERCIAL "Build with the EXV_COMMERCIAL_VERSION symbol set" OFF ) -OPTION( EXIV2_ENABLE_BUILD_SAMPLES "Build the unit tests" ON ) -OPTION( EXIV2_ENABLE_BUILD_PO "Build translations files" OFF ) -OPTION( EXIV2_ENABLE_VIDEO "Build video support into library" OFF ) -OPTION( EXIV2_ENABLE_WEBREADY "Build webready support into library" OFF ) -OPTION( EXIV2_ENABLE_DYNAMIC_RUNTIME "Use dynamic runtime (used for static libs)" OFF ) +option( EXIV2_ENABLE_SHARED "Build exiv2 as a shared library (dll)" ON ) +option( EXIV2_ENABLE_XMP "Build with XMP metadata support" ON ) +option( EXIV2_ENABLE_LIBXMP "Build a static convenience Library for XMP" ON ) +option( EXIV2_ENABLE_PNG "Build with png support (requires libz)" ON ) +option( EXIV2_ENABLE_NLS "Build native language support (requires gettext)" ON ) +option( EXIV2_ENABLE_PRINTUCS2 "Build with Printucs2" ON ) +option( EXIV2_ENABLE_LENSDATA "Build including lens data" ON ) +option( EXIV2_ENABLE_COMMERCIAL "Build with the EXV_COMMERCIAL_VERSION symbol set" OFF ) +option( EXIV2_ENABLE_BUILD_SAMPLES "Build the unit tests" ON ) +option( EXIV2_ENABLE_BUILD_PO "Build translations files" OFF ) +option( EXIV2_ENABLE_VIDEO "Build video support into library" OFF ) +option( EXIV2_ENABLE_WEBREADY "Build webready support into library" OFF ) +option( EXIV2_ENABLE_DYNAMIC_RUNTIME "Use dynamic runtime (used for static libs)" OFF ) if (WIN32) - OPTION( EXIV2_ENABLE_WIN_UNICODE "Use Unicode paths (wstring) on Windows" OFF ) - OPTION( EXIV2_ENABLE_CURL "USE Libcurl for HttpIo" OFF ) - OPTION( EXIV2_ENABLE_SSH "USE Libssh for SshIo" OFF ) + option( EXIV2_ENABLE_WIN_UNICODE "Use Unicode paths (wstring) on Windows" OFF ) + option( EXIV2_ENABLE_CURL "USE Libcurl for HttpIo" OFF ) + option( EXIV2_ENABLE_SSH "USE Libssh for SshIo" OFF ) else() - OPTION( EXIV2_ENABLE_CURL "USE Libcurl for HttpIo" ON ) - OPTION( EXIV2_ENABLE_SSH "USE Libssh for SshIo" ON ) + option( EXIV2_ENABLE_CURL "USE Libcurl for HttpIo" ON ) + option( EXIV2_ENABLE_SSH "USE Libssh for SshIo" ON ) endif() -OPTION( EXIV2_ENABLE_TOOLS "Build exiv2 executable" ON ) +option( EXIV2_ENABLE_TOOLS "Build exiv2 executable" ON ) include(config/findDependencies.cmake) include(config/compilerFlags.cmake) if( EXIV2_ENABLE_COMMERCIAL ) - SET (EXIV2_ENABLE_LENSDATA OFF) - SET (EXIV2_ENABLE_NLS OFF) + set (EXIV2_ENABLE_LENSDATA OFF) + set (EXIV2_ENABLE_NLS OFF) endif() if( MSVC ) @@ -66,7 +66,7 @@ if( MSVC ) endif() if( EXIV2_ENABLE_XMP ) - SET( HAVE_XMP_TOOLKIT ON ) + set( HAVE_XMP_TOOLKIT ON ) endif() include( config/generateConfigFile.cmake ) @@ -75,16 +75,16 @@ include_directories(${CMAKE_BINARY_DIR}) # Make the exv_conf.h file visible for include( config/CMakeChecks.txt ) if( EXIV2_ENABLE_XMP ) - ADD_SUBDIRECTORY( xmpsdk ) + add_subdirectory( xmpsdk ) endif() -ADD_SUBDIRECTORY( src ) +add_subdirectory( src ) if( EXIV2_ENABLE_BUILD_SAMPLES ) - ADD_SUBDIRECTORY( samples ) + add_subdirectory( samples ) endif() if( EXIV2_ENABLE_BUILD_PO ) - ADD_SUBDIRECTORY( po ) + add_subdirectory( po ) endif() ## diff --git a/config/CMakeChecks.txt b/config/CMakeChecks.txt index ef474d9b..17958b1e 100644 --- a/config/CMakeChecks.txt +++ b/config/CMakeChecks.txt @@ -32,14 +32,14 @@ # ConfigureChecks for exiv2 if( EXIV2_ENABLE_SHARED ) - ADD_DEFINITIONS( -DEXV_HAVE_DLL ) - SET( STATIC_FLAG SHARED ) + add_definitions( -DEXV_HAVE_DLL ) + set( STATIC_FLAG SHARED ) else() - SET( STATIC_FLAG STATIC ) + set( STATIC_FLAG STATIC ) endif() if( EXIV2_ENABLE_COMMERCIAL ) - ADD_DEFINITIONS( -DEXV_COMMERCIAL_VERSION ) + add_definitions( -DEXV_COMMERCIAL_VERSION ) endif() CONFIGURE_FILE(config/exiv2_uninstall.cmake ${CMAKE_BINARY_DIR}/cmake_uninstall.cmake COPYONLY) diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index 4fe6ba54..447fdf33 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -4,7 +4,7 @@ # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -SET( SAMPLES addmoddel.cpp +set( SAMPLES addmoddel.cpp convert-test.cpp easyaccess-test.cpp exifcomment.cpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f7fd7844..3e0fa208 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,7 +7,7 @@ # For details see the accompanying COPYING-CMAKE-SCRIPTS file. # Private headers which are only needed for the library itself -SET( LIBEXIV2_PRIVATE_HDR canonmn_int.hpp +set( LIBEXIV2_PRIVATE_HDR canonmn_int.hpp casiomn_int.hpp cr2image_int.hpp crwimage_int.hpp @@ -33,7 +33,7 @@ SET( LIBEXIV2_PRIVATE_HDR canonmn_int.hpp ) # Add standalone C++ header files to this list -SET( LIBEXIV2_HDR ../include/exiv2/asfvideo.hpp +set( LIBEXIV2_HDR ../include/exiv2/asfvideo.hpp ../include/exiv2/basicio.hpp ../include/exiv2/bmpimage.hpp ../include/exiv2/config.h @@ -82,7 +82,7 @@ SET( LIBEXIV2_HDR ../include/exiv2/asfvideo.hpp ) # Add library C++ source files to this list -SET( LIBEXIV2_SRC asfvideo.cpp +set( LIBEXIV2_SRC asfvideo.cpp basicio.cpp bmpimage.cpp canonmn.cpp @@ -172,7 +172,7 @@ else() add_library( exiv2lib ${STATIC_FLAG} ${LIBEXIV2_SRC} ${LIBEXIV2_HDR} ${LIBEXIV2_PRIVATE_HDR}) endif() -SET_TARGET_PROPERTIES( exiv2lib PROPERTIES +set_target_properties( exiv2lib PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} DEFINE_SYMBOL EXV_BUILDING_LIB From 1fc319c0e488af9eef5a758bdef10aa20d99e397 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Mon, 21 Aug 2017 01:10:47 +0200 Subject: [PATCH 3/5] Lowercase add_custom_target, configure_file, install macros --- CMakeLists.txt | 6 +++--- config/CMakeChecks.txt | 12 ++++++------ po/CMakeLists.txt | 2 +- samples/CMakeLists.txt | 2 +- src/CMakeLists.txt | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dfc8fbe9..cda1a0f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,8 +89,8 @@ endif() ## # tests -ADD_CUSTOM_TARGET(tests COMMAND env EXIV2_BINDIR="${CMAKE_BINARY_DIR}"/bin make tests WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" ) -ADD_CUSTOM_TARGET(geotag-test COMMAND env EXIV2_BINDIR="${CMAKE_BINARY_DIR}"/bin make geotag-test WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" ) +add_custom_target(tests COMMAND env EXIV2_BINDIR="${CMAKE_BINARY_DIR}"/bin make tests WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" ) +add_custom_target(geotag-test COMMAND env EXIV2_BINDIR="${CMAKE_BINARY_DIR}"/bin make geotag-test WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" ) ## # http://dev.exiv2.org/boards/3/topics/1364 @@ -98,7 +98,7 @@ ADD_CUSTOM_TARGET(geotag-test COMMAND env EXIV2_BINDIR="${CMAKE_BINARY_DIR}"/bin # has to run 'make config' and './configure' # and copy bin/taglist to /bin/taglist for use by 'make doc' if( MINGW OR UNIX OR APPLE) - ADD_CUSTOM_TARGET(doc + add_custom_target(doc WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/doc" COMMAND chmod +x ./cmake_doc.sh COMMAND ./cmake_doc.sh "${CMAKE_BINARY_DIR}" diff --git a/config/CMakeChecks.txt b/config/CMakeChecks.txt index 17958b1e..3f5f4380 100644 --- a/config/CMakeChecks.txt +++ b/config/CMakeChecks.txt @@ -42,13 +42,13 @@ if( EXIV2_ENABLE_COMMERCIAL ) add_definitions( -DEXV_COMMERCIAL_VERSION ) endif() -CONFIGURE_FILE(config/exiv2_uninstall.cmake ${CMAKE_BINARY_DIR}/cmake_uninstall.cmake COPYONLY) -ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake") +configure_file(config/exiv2_uninstall.cmake ${CMAKE_BINARY_DIR}/cmake_uninstall.cmake COPYONLY) +add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake") if( NOT MSVC ) - CONFIGURE_FILE( config/exiv2.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/exiv2.pc @ONLY ) - INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) - CONFIGURE_FILE( config/exiv2.lsm.cmake ${CMAKE_CURRENT_BINARY_DIR}/exiv2.lsm) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2.lsm DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) + configure_file( config/exiv2.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/exiv2.pc @ONLY ) + install( FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) + configure_file( config/exiv2.lsm.cmake ${CMAKE_CURRENT_BINARY_DIR}/exiv2.lsm) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2.lsm DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) endif() diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt index 0403fc24..a15da0f8 100644 --- a/po/CMakeLists.txt +++ b/po/CMakeLists.txt @@ -12,7 +12,7 @@ UPDATE_TRANSLATIONS(exiv2 ${PO_FILES}) ADD_TRANSLATIONS(exiv2 ${PO_FILES}) -ADD_CUSTOM_TARGET( pot-update +add_custom_target( pot-update COMMAND xgettext -d ${PACKAGE_NAME} -s -D ${CMAKE_CURRENT_SOURCE_DIR}/.. diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index 447fdf33..4c08aaf1 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -89,4 +89,4 @@ target_link_libraries(remotetest exiv2lib) # ****************************************************************************** # Man page -INSTALL( FILES exiv2samples.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 ) +install( FILES exiv2samples.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3e0fa208..68747ecc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -287,4 +287,4 @@ endif() # ****************************************************************************** # Man page -INSTALL( FILES exiv2.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 ) +install( FILES exiv2.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 ) From 20c7ad6c597cefc3d46e75e0c4a93df6fb736976 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Mon, 21 Aug 2017 01:18:21 +0200 Subject: [PATCH 4/5] Lowercase include{,_directories} --- CMakeLists.txt | 2 +- src/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cda1a0f6..b14d1962 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,4 +105,4 @@ if( MINGW OR UNIX OR APPLE) ) endif() -INCLUDE( config/printSummary.cmake ) +include( config/printSummary.cmake ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 68747ecc..36509e20 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -160,7 +160,7 @@ if( EXIV2_ENABLE_PNG ) set( LIBEXIV2_HDR ${LIBEXIV2_HDR} ../include/exiv2/pngimage.hpp ) endif() -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) # ****************************************************************************** # exiv2lib library From a768b851914e2e3e25a15dec9739ce86adb25339 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Mon, 21 Aug 2017 15:30:38 +0200 Subject: [PATCH 5/5] Lowercase target_link_libraries --- samples/CMakeLists.txt | 2 +- src/CMakeLists.txt | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index 4c08aaf1..78119323 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -80,7 +80,7 @@ target_link_libraries(conntest PRIVATE exiv2lib) # ****************************************************************************** # exifprint application # ADD_EXECUTABLE( exifprint exifprint.cpp ) -# TARGET_LINK_LIBRARIES( exifprint exiv2lib ) +# target_link_libraries( exifprint exiv2lib ) # ****************************************************************************** # remotetest application diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 36509e20..4c5d7247 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -207,9 +207,9 @@ if ( MSVC ) target_compile_definitions(exiv2lib PRIVATE PSAPI_VERSION=1) # to be compatible with <= WinVista (#905) if ( EXIV2_ENABLE_STATIC ) - TARGET_LINK_LIBRARIES( exiv2lib zlibstatic ${ZLIB_LIBRARIES} ) + target_link_libraries( exiv2lib zlibstatic ${ZLIB_LIBRARIES} ) else() - TARGET_LINK_LIBRARIES( exiv2lib PRIVATE ${ZLIB_LIBRARIES} ) + target_link_libraries( exiv2lib PRIVATE ${ZLIB_LIBRARIES} ) endif() source_group("Header Files" FILES ${LIBEXIV2_HDR} ) source_group("Header Files" FILES ${LIBCURL_HDR} ) @@ -225,23 +225,23 @@ else() endif() if( EXIV2_ENABLE_XMP AND EXIV2_ENABLE_LIBXMP ) - TARGET_LINK_LIBRARIES( exiv2lib PUBLIC xmp ) + target_link_libraries( exiv2lib PUBLIC xmp ) endif() if( EXIV2_ENABLE_PNG ) - TARGET_LINK_LIBRARIES( exiv2lib PRIVATE ${ZLIB_LIBRARIES} ) + target_link_libraries( exiv2lib PRIVATE ${ZLIB_LIBRARIES} ) endif() if( EXIV2_ENABLE_NLS ) - TARGET_LINK_LIBRARIES( exiv2lib PRIVATE ${LIBINTL_LIBRARIES} ) + target_link_libraries( exiv2lib PRIVATE ${LIBINTL_LIBRARIES} ) endif() if( ICONV_FOUND ) - TARGET_LINK_LIBRARIES( exiv2lib PRIVATE ${ICONV_LIBRARIES} ) + target_link_libraries( exiv2lib PRIVATE ${ICONV_LIBRARIES} ) endif() if (CYGWIN OR MINGW) - TARGET_LINK_LIBRARIES( exiv2lib PRIVATE psapi ws2_32 ) + target_link_libraries( exiv2lib PRIVATE psapi ws2_32 ) endif() install(TARGETS exiv2lib