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}