Version handling in main window title, About window (now with tabs, including the license) and in PP3 files

This commit is contained in:
Hombre
2011-02-08 01:25:40 +01:00
parent 84945ee826
commit aac9c13b9f
16 changed files with 856 additions and 610 deletions

View File

@@ -1,7 +1,34 @@
cmake_minimum_required(VERSION 2.6)
# the default target is 'Debug'
set (CMAKE_BUILD_TYPE Debug CACHE STRING "One of: None Debug Release RelWithDebInfo MinSizeRel.")
# set the default target processor to 'native', i.e. the one of your own machine. The complete list of targets is in ProcessorTargets.cmake
# you can override the cpu list by setting PROC_TARGET_NUMBER to 0, but you have to provide at least
# the PROC_LABEL value (set to "undefined" by default) in order to provide downloadable builds,
# and evetually provide PROC_FLAGS if you want to manually set the processor specific flags
set (PROC_TARGET_NUMBER 2 CACHE STRING "Selected target processor from the list above (taken from ProcessorTargets.cmake)")
# The following line set special compilation flags for RTEngine, and will be added to CMAKE_CXX_FLAGS
# It were moved away from rtengine/CMakefiles.txt, because some users may want to remove -ffast_math :
# this flag speeds up the floating-point operations, but with a little bite less precisions. This default value
# gives the same result/behaviour as before.
set (RTENGINE_CXX_FLAGS "-ffast-math -funroll-loops" CACHE STRING "Special compilation flags for RTEngine")
#loading the processor targets list
set (PROC_LABEL "undefined")
set (PROC_FLAGS "")
if (PROC_TARGET_NUMBER GREATER 0)
include (ProcessorTargets.cmake)
set (PROC_LABEL ${PROC_TARGET_${PROC_TARGET_NUMBER}_LABEL})
set (PROC_FLAGS ${PROC_TARGET_${PROC_TARGET_NUMBER}_FLAGS})
endif (PROC_TARGET_NUMBER GREATER 0)
# adding the proc flags to the build flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PROC_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PROC_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PROC_FLAGS}")
if (APPLE)
# SET (CMAKE_OSX_ARCHITECTURES "i386;x86_64;" )
# SET (CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "i386;x86_64;" )
@@ -44,6 +71,30 @@ if (NOT DEFINED LIBDIR)
endif (WIN32 OR APPLE)
endif (NOT DEFINED LIBDIR)
if (NOT DEFINED DOCDIR)
if (WIN32 OR APPLE)
set (DOCDIR ${CMAKE_CURRENT_SOURCE_DIR}/release/doc)
else (WIN32 OR APPLE)
set (DOCDIR ${CMAKE_INSTALL_PREFIX}/share/doc)
endif (WIN32 OR APPLE)
endif (NOT DEFINED DOCDIR)
if (NOT DEFINED CREDITSDIR)
if (WIN32 OR APPLE)
set (CREDITSDIR ${CMAKE_CURRENT_SOURCE_DIR}/release)
else (WIN32 OR APPLE)
set (CREDITSDIR ${CMAKE_INSTALL_PREFIX}/share/doc)
endif (WIN32 OR APPLE)
endif (NOT DEFINED CREDITSDIR)
if (NOT DEFINED LICENCEDIR)
if (WIN32 OR APPLE)
set (LICENCEDIR ${CMAKE_CURRENT_SOURCE_DIR}/release)
else (WIN32 OR APPLE)
set (LICENCEDIR ${CMAKE_INSTALL_PREFIX}/share/doc)
endif (WIN32 OR APPLE)
endif (NOT DEFINED LICENCEDIR)
# check for libraries
find_package(PkgConfig)
pkg_check_modules (GTK REQUIRED gtk+-2.0>=2.12)
@@ -82,6 +133,16 @@ else (WIN32)
find_package (ZLIB REQUIRED)
endif (WIN32)
#generating AboutThisBuild.txt
if (WIN32)
include (About-Windows.cmake)
elseif (APPLE)
include (About-Apple.cmake)
else (WIN32)
include (About-Linux.cmake)
endif (WIN32)
add_dependencies(AboutFile Debug Release MinSizeRel RelWithDebInfo)
# link rawzor
if (WITH_RAWZOR)
if (WIN32)
@@ -144,7 +205,9 @@ if (UNIX)
install (PROGRAMS rtstart DESTINATION ${BINDIR})
endif (UNIX)
install (FILES AUTHORS.txt LICENSE.txt DESTINATION ${BINDIR})
install (FILES AUTHORS.txt DESTINATION ${CREDITSDIR})
install (FILES LICENSE.txt DESTINATION ${LICENCEDIR})
install (FILES AboutThisBuild.txt DESTINATION ${BINDIR})
add_subdirectory (rtexif)
add_subdirectory (rtengine)