diff --git a/CMakeLists.txt b/CMakeLists.txt index aab5888f..5f555af8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,8 +84,6 @@ IF( MINGW OR UNIX ) string(REGEX MATCHALL "[0-9]+" GCC_VERSION_COMPONENTS ${GCC_VERSION}) list(GET GCC_VERSION_COMPONENTS 0 GCC_MAJOR) - message(STATUS Compiler: ${COMPILER} " Major:" ${GCC_MAJOR}) - IF ( CYGWIN OR ( ${GCC_MAJOR} GREATER 5 )) ADD_DEFINITIONS( -std=gnu++98 ) # to support snprintf ELSE() @@ -184,5 +182,6 @@ IF( MINGW OR UNIX OR APPLE) ) ENDIF() +INCLUDE( config/printSummary.cmake ) # That's all Folks! ## diff --git a/config/CMakeChecks.txt b/config/CMakeChecks.txt index 71026d02..4e95bb36 100644 --- a/config/CMakeChecks.txt +++ b/config/CMakeChecks.txt @@ -177,11 +177,6 @@ check_function_exists( strtol HAVE_STRTOL ) check_function_exists( timegm HAVE_TIMEGM ) check_function_exists( vprintf HAVE_VPRINTF ) -MESSAGE( STATUS "None: ${CMAKE_CXX_FLAGS}" ) -MESSAGE( STATUS "Debug: ${CMAKE_CXX_FLAGS_DEBUG}" ) -MESSAGE( STATUS "Release: ${CMAKE_CXX_FLAGS_RELEASE}" ) -MESSAGE( STATUS "RelWithDebInfo: ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" ) -MESSAGE( STATUS "MinSizeRel: ${CMAKE_CXX_FLAGS_MINSIZEREL}" ) IF( HAVE_STDBOOL_H ) CHECK_SYMBOL_EXISTS( "_Bool" stdbool.h HAVE__BOOL ) @@ -311,38 +306,3 @@ IF( NOT MSVC ) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/exiv2.lsm DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ) ENDIF( NOT MSVC ) -# ****************************************************************************** -# output chosen build options -MACRO( OptionOutput _outputstring ) - IF( ${ARGN} ) - SET( _var "YES" ) - ELSE( ${ARGN} ) - SET( _var "NO" ) - ENDIF( ${ARGN} ) - MESSAGE( STATUS "${_outputstring}${_var}" ) -ENDMACRO( OptionOutput _outputstring ) - -MESSAGE( STATUS "------------------------------------------------------------------" ) -MESSAGE( STATUS "${PACKAGE_STRING} configure results <${PACKAGE_URL}>" ) -OptionOutput( "Building PNG support: " EXIV2_ENABLE_PNG AND ZLIB_FOUND ) -OptionOutput( "Building shared library: " EXIV2_ENABLE_SHARED ) -OptionOutput( "XMP metadata support: " EXIV2_ENABLE_XMP ) -OptionOutput( "Building static libxmp: " EXIV2_ENABLE_LIBXMP ) -OptionOutput( "Native language support: " EXIV2_ENABLE_NLS ) -OptionOutput( "Conversion of Windows XP tags: " EXIV2_ENABLE_PRINTUCS2 ) -OptionOutput( "Nikon lens database: " EXIV2_ENABLE_LENSDATA ) -OptionOutput( "Commercial build: " EXIV2_ENABLE_COMMERCIAL ) -OptionOutput( "Build the unit tests: " EXIV2_ENABLE_BUILD_SAMPLES ) -OptionOutput( "Building translations files: " EXIV2_ENABLE_BUILD_PO ) -OptionOutput( "Building video support: " EXIV2_ENABLE_VIDEO ) -OptionOutput( "Building webready support: " EXIV2_ENABLE_WEBREADY ) - -if ( EXIV2_ENABLE_WEBREADY ) -OptionOutput( "USE Libcurl for HttpIo: " EXIV2_ENABLE_CURL ) -OptionOutput( "USE Libssh for SshIo: " EXIV2_ENABLE_SSH ) -endif ( EXIV2_ENABLE_WEBREADY ) -IF (WIN32) -OptionOutput( "Dynamic runtime override: " EXIV2_ENABLE_DYNAMIC_RUNTIME ) -OptionOutput( "Unicode paths (wstring): " EXIV2_ENABLE_WIN_UNICODE ) -ENDIF() -MESSAGE( STATUS "------------------------------------------------------------------" ) diff --git a/config/printSummary.cmake b/config/printSummary.cmake new file mode 100644 index 00000000..6b3d7160 --- /dev/null +++ b/config/printSummary.cmake @@ -0,0 +1,43 @@ +message( STATUS "None: ${CMAKE_CXX_FLAGS}" ) +message( STATUS "Debug: ${CMAKE_CXX_FLAGS_DEBUG}" ) +message( STATUS "Release: ${CMAKE_CXX_FLAGS_RELEASE}" ) +message( STATUS "RelWithDebInfo: ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" ) +message( STATUS "MinSizeRel: ${CMAKE_CXX_FLAGS_MINSIZEREL}" ) + +# output chosen build options +macro( OptionOutput _outputstring ) + if( ${ARGN} ) + set( _var "YES" ) + else( ${ARGN} ) + set( _var "NO" ) + endif( ${ARGN} ) + message( STATUS "${_outputstring}${_var}" ) +endmacro( OptionOutput _outputstring ) + +message(STATUS Compiler: ${COMPILER} " Major:" ${GCC_MAJOR}) +message( STATUS "------------------------------------------------------------------" ) +message( STATUS "${PACKAGE_STRING} configure results <${PACKAGE_URL}>" ) +OptionOutput( "Building PNG support: " EXIV2_ENABLE_PNG AND ZLIB_FOUND ) +OptionOutput( "Building shared library: " EXIV2_ENABLE_SHARED ) +OptionOutput( "XMP metadata support: " EXIV2_ENABLE_XMP ) +OptionOutput( "Building static libxmp: " EXIV2_ENABLE_LIBXMP ) +OptionOutput( "Native language support: " EXIV2_ENABLE_NLS ) +OptionOutput( "Conversion of Windows XP tags: " EXIV2_ENABLE_PRINTUCS2 ) +OptionOutput( "Nikon lens database: " EXIV2_ENABLE_LENSDATA ) +OptionOutput( "Commercial build: " EXIV2_ENABLE_COMMERCIAL ) +OptionOutput( "Build the unit tests: " EXIV2_ENABLE_BUILD_SAMPLES ) +OptionOutput( "Building translations files: " EXIV2_ENABLE_BUILD_PO ) +OptionOutput( "Building video support: " EXIV2_ENABLE_VIDEO ) +OptionOutput( "Building webready support: " EXIV2_ENABLE_WEBREADY ) + +if ( EXIV2_ENABLE_WEBREADY ) + OptionOutput( "USE Libcurl for HttpIo: " EXIV2_ENABLE_CURL ) + OptionOutput( "USE Libssh for SshIo: " EXIV2_ENABLE_SSH ) +endif ( EXIV2_ENABLE_WEBREADY ) + +if (WIN32) + OptionOutput( "Dynamic runtime override: " EXIV2_ENABLE_DYNAMIC_RUNTIME) + OptionOutput( "Unicode paths (wstring): " EXIV2_ENABLE_WIN_UNICODE ) +endif() + +message( STATUS "------------------------------------------------------------------" )