diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ffce3a7e..9c4e74def 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -331,7 +331,7 @@ if (OUT_OF_SOURCE_BUILD) endforeach(f) endif () -## BEGIN: Generating AboutThisBuild.txt +## BEGIN: Create AboutThisBuild.txt and other version-dependent files. # set the bit number information of the platform if (CMAKE_SIZEOF_VOID_P EQUAL 4) set(PROC_BIT_DEPTH 32 bits) @@ -382,9 +382,9 @@ endif (WIN32) list(APPEND ABOUT_COMMAND_WITH_ARGS -P "${PROJECT_SOURCE_DIR}/AboutThisBuild.cmake") -add_custom_target(AboutFile ALL +add_custom_target(UpdateInfo ALL COMMAND ${ABOUT_COMMAND_WITH_ARGS} - COMMENT "Creating the about file") + COMMENT "Creating AboutThisBuild.txt and other version-dependent files") ## END: Generating AboutThisBuild.txt diff --git a/AboutThisBuild.cmake b/UpdateInfo.cmake similarity index 82% rename from AboutThisBuild.cmake rename to UpdateInfo.cmake index bfb3d6eb5..40cdab6d6 100644 --- a/AboutThisBuild.cmake +++ b/UpdateInfo.cmake @@ -84,6 +84,28 @@ else (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND) include("${PROJECT_SOURCE_DIR}/ReleaseInfo.cmake") endif (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND) +if (WIN32) + if (CMAKE_SIZEOF_VOID_P EQUAL 4) + set(BUILD_BIT_DEPTH 32) + # 32 bits builds has to be installable on 64 bits system, to support WinXP/64. + set(ARCHITECTURE_ALLOWED "x86 x64 ia64") + # installing in 32 bits mode even on 64 bits OS and architecture + set(INSTALL_MODE "") + # set part of the output archive name + set(SYSTEM_NAME "WinXP") + elseif (CMAKE_SIZEOF_VOID_P EQUAL 8) + set(BUILD_BIT_DEPTH 64) + # Restricting the 64 bits builds to 64 bits systems only + set(ARCHITECTURE_ALLOWED "x64 ia64") + # installing in 64 bits mode for all 64 bits processors, even for itanium architecture + set(INSTALL_MODE "x64 ia64") + # set part of the output archive name + set(SYSTEM_NAME "WinVista") + endif (CMAKE_SIZEOF_VOID_P EQUAL 4) + + configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/../tools/win/InnoSetup/WindowsInnoSetup.iss.in" "${CMAKE_CURRENT_BINARY_DIR}/WindowsInnoSetup.iss") +endif (WIN32) + # build version.h from template configure_file ("${PROJECT_SOURCE_DIR}/rtgui/version.h.in" "${CMAKE_BINARY_DIR}/rtgui/version.h") # build AboutThisBuild.txt from template diff --git a/rtdata/CMakeLists.txt b/rtdata/CMakeLists.txt index 939584061..b3f44a68c 100644 --- a/rtdata/CMakeLists.txt +++ b/rtdata/CMakeLists.txt @@ -19,25 +19,6 @@ else (WIN32) endif (WIN32) if (WIN32) - if (CMAKE_SIZEOF_VOID_P EQUAL 4) - set(BUILD_BIT_DEPTH 32) - # 32 bits builds has to be installable on 64 bits system, to support WinXP/64. - set(ARCHITECTURE_ALLOWED "x86 x64 ia64") - # installing in 32 bits mode even on 64 bits OS and architecture - set(INSTALL_MODE "") - # set part of the output archive name - set(SYSTEM_NAME "WinXP") - elseif (CMAKE_SIZEOF_VOID_P EQUAL 8) - set(BUILD_BIT_DEPTH 64) - # Restricting the 64 bits builds to 64 bits systems only - set(ARCHITECTURE_ALLOWED "x64 ia64") - # installing in 64 bits mode for all 64 bits processors, even for itanium architecture - set(INSTALL_MODE "x64 ia64") - # set part of the output archive name - set(SYSTEM_NAME "WinVista") - endif (CMAKE_SIZEOF_VOID_P EQUAL 4) - - configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/../tools/win/InnoSetup/WindowsInnoSetup.iss.in" "${CMAKE_CURRENT_BINARY_DIR}/WindowsInnoSetup.iss") install (FILES "${CMAKE_CURRENT_BINARY_DIR}/WindowsInnoSetup.iss" DESTINATION ${BINDIR}) endif (WIN32) diff --git a/rtengine/CMakeLists.txt b/rtengine/CMakeLists.txt index 477ccecae..dbab1dc2d 100644 --- a/rtengine/CMakeLists.txt +++ b/rtengine/CMakeLists.txt @@ -29,7 +29,7 @@ set (RTENGINESOURCEFILES colortemp.cc curves.cc flatcurves.cc diagonalcurves.cc include_directories (BEFORE "${CMAKE_CURRENT_BINARY_DIR}") add_library (rtengine ${RTENGINESOURCEFILES}) -add_dependencies (rtengine AboutFile) +add_dependencies (rtengine UpdateInfo) #It may be nice to store library version too IF (BUILD_SHARED_LIBS) diff --git a/rtexif/CMakeLists.txt b/rtexif/CMakeLists.txt index a2e713ed7..7dad67006 100644 --- a/rtexif/CMakeLists.txt +++ b/rtexif/CMakeLists.txt @@ -1,5 +1,5 @@ add_library (rtexif rtexif.cc stdattribs.cc nikonattribs.cc canonattribs.cc pentaxattribs.cc fujiattribs.cc sonyminoltaattribs.cc olympusattribs.cc kodakattribs.cc) -add_dependencies (rtexif AboutFile) +add_dependencies (rtexif UpdateInfo) IF (WIN32) set_target_properties (rtexif PROPERTIES COMPILE_FLAGS " -ffast-math -fexpensive-optimizations") diff --git a/rtgui/CMakeLists.txt b/rtgui/CMakeLists.txt index ad896041f..be2186e63 100644 --- a/rtgui/CMakeLists.txt +++ b/rtgui/CMakeLists.txt @@ -62,7 +62,7 @@ endif (WIN32) configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h") add_executable (rth ${EXTRA_SRC} ${BASESOURCEFILES}) -add_dependencies (rth AboutFile) +add_dependencies (rth UpdateInfo) set_target_properties (rth PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS}" OUTPUT_NAME rawtherapee) #target_link_libraries (rth rtengine ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${TIFF_LIBRARIES} ${EXTRA_LIB} ${GOBJECT_LIBRARIES} ${GTHREAD_LIBRARIES}