diff --git a/CMakeLists.txt b/CMakeLists.txt index 8cc9e1c0..d363e651 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,15 +44,15 @@ SET( GENERIC_LIB_VERSION "6.0.0" ) SET( GENERIC_LIB_SOVERSION "6" ) # options and there 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" OFF ) -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 "include lens data" ON ) -OPTION( EXIV2_ENABLE_COMMERCIAL "compile with the EXV_COMMERCIAL_VERSION symbol set" OFF ) -OPTION( BUILD_samples "Build the unit tests" 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" OFF ) +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" OFF ) IF( MINGW OR UNIX ) ADD_DEFINITIONS(-Wall @@ -70,9 +70,9 @@ IF( EXIV2_ENABLE_XMP ) SET( XMPLIB "do" ) ENDIF( EXIV2_ENABLE_XMP ) -IF( BUILD_samples ) +IF( EXIV2_ENABLE_BUILD_SAMPLES ) EXIV2_ENABLE_TESTING() -ENDIF( BUILD_samples ) +ENDIF( EXIV2_ENABLE_BUILD_SAMPLES ) INCLUDE( config/ConfigureChecks.cmake ) @@ -109,9 +109,9 @@ ENDIF( ${EXV_HAVE_STDINT_H} ) ADD_SUBDIRECTORY( xmpsdk ) ADD_SUBDIRECTORY( src ) -IF( BUILD_samples ) +IF( EXIV2_ENABLE_BUILD_SAMPLES ) ADD_SUBDIRECTORY( samples ) -ENDIF( BUILD_samples ) +ENDIF( EXIV2_ENABLE_BUILD_SAMPLES ) IF( EXIV2_ENABLE_XMP ) ADD_DEPENDENCIES(exiv2 xmp) diff --git a/README-CMAKE b/README-CMAKE index 3f25d2ed..ac199db4 100644 --- a/README-CMAKE +++ b/README-CMAKE @@ -43,22 +43,42 @@ To modify the configuration $ ccmake .. +Usual CMake options : + +-DCMAKE_INSTALL_PREFIX : decide where the program will be install on your computer. +-DCMAKE_BUILD_TYPE : decide which type of build you want. You can chose between: + "debugfull". : for hacking. Include all debug information. + "debug". + "profile". + "relwithdebinfo" : default. use gcc -O2 -g options. + "release" : generate stripped and optimized bin files. For packaging. + +Specific Exiv2 options : + +-DEXIV2_ENABLE_SHARED : Build exiv2 as a shared library (dll). +-DEXIV2_ENABLE_XMP : Build with XMP metadata support. +-DEXIV2_ENABLE_LIBXMP : Build a static convenience Library for XMP. +-DEXIV2_ENABLE_PNG : Build with png support (requires libz). +-DEXIV2_ENABLE_NLS : Build native language support (requires gettext). +-DEXIV2_ENABLE_PRINTUCS2 : Build with Printucs2. +-DEXIV2_ENABLE_LENSDATA : Build including lens data. +-DEXIV2_ENABLE_COMMERCIAL : Build with the EXV_COMMERCIAL_VERSION symbol set. +-EXIV2_ENABLE_BUILD_SAMPLES : Build the unit tests. Default install locations -... + +Use -DCMAKE_INSTALL_PREFIX like this : + +"cmake . -DCMAKE_INSTALL_PREFIX=/usr" is equivalent to "./configure --prefix=/usr" with automake/configure. To uninstall Exiv2, run: $ make uninstall - NOTE: on UNIX-like systems, you can use "$ xargs rm < install_manifest.txt" - - b) Using the cmake GUI ccmake - Dependencies ============ diff --git a/TODO-CMAKE b/TODO-CMAKE index 8f8098b0..ddb8ee1f 100644 --- a/TODO-CMAKE +++ b/TODO-CMAKE @@ -8,7 +8,6 @@ (some applications and my own release-build process need this) to the README.CMAKE * Manage i18n extraction to generate .po files. (See http://www.cmake.org/pipermail/cmake/2009-July/031003.html) - check option ENABLE_NLS that doesn't work correctly here. * Rename configuration settings to EXIV2_*, e.g., EXIV2_ENABLE_SHARED @@ -75,12 +74,13 @@ DONE * Manage eviv2.lsm file with CMake, like it's do with kdegraphics/libs .lsm DONE * added cmake target to uninstall Exiv2, based on KDE4 cmake script. DONE * The following options of the configure script should be supported - --disable-shared DONE - ENABLE_SHARED_EXIV2 - --disable-xmp DONE - ENABLE_XMP - --without-zlib DONE - ENABLE_PNG - --enable-commercial DONE - ENABLE_COMMERCIAL - --disable-lensdata DONE - ENABLE_LENSDATA - --disable-printucs2 DONE - ENABLE_PRINTUCS2 + --disable-shared => -ENABLE_SHARED_EXIV2 + --disable-xmp => -ENABLE_XMP + --without-zlib => -ENABLE_PNG + --enable-commercial => -ENABLE_COMMERCIAL + --disable-lensdata => -ENABLE_LENSDATA + --disable-printucs2 => -ENABLE_PRINTUCS2 + --enable-nls => -ENABLE_NLS INFO * check How does cmake handle RPATH? (I'll read up on this).