Small bug fixed in the building process, and updated COMPILE.txt file.

This commit is contained in:
Hombre 2011-02-10 12:38:33 +01:00
parent 6089c1c7a6
commit 9864ba8fd6
2 changed files with 43 additions and 8 deletions

View File

@ -3,11 +3,9 @@ cmake_minimum_required(VERSION 2.6)
# the default target is 'Debug' # the default target is 'Debug'
set (CMAKE_BUILD_TYPE Debug CACHE STRING "One of: None Debug Release RelWithDebInfo MinSizeRel.") 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 # By default, we don't use specific processor target, so PROC_TARGET_NUMBER is set to 0. If can specify other values to select specific
# you can override the cpu list by setting PROC_TARGET_NUMBER to 0, but you have to provide at least # processor targets, which list can be found in ProcessorTargets.cmake.
# the PROC_LABEL value (set to "undefined" by default) in order to provide downloadable builds, set (PROC_TARGET_NUMBER 0 CACHE STRING "Selected target processor from the list above (taken from ProcessorTargets.cmake)")
# 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 # 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 : # It were moved away from rtengine/CMakefiles.txt, because some users may want to remove -ffast_math :

View File

@ -2,6 +2,22 @@ If you have problems with the compilation, identified the reason and fixed
the bug, please send me the updated build scripts (CMakeLists.txt files) to: the bug, please send me the updated build scripts (CMakeLists.txt files) to:
hgabor@rawtherapee.com hgabor@rawtherapee.com
Preamble:
---------
Cmake is actually used to create the Makefiles (scripts that handle the build process) or specific Integrated Developement Environement (IDE) projects.
It is designed to find all necessary compilation flags for your specific machine, but everything can be overriden.
RT's build mechanism will generate a build information file, named "AboutThisBuild.txt", and require some parameters that can't be set by Cmake, so it's
done in our build script, and may be aoverriden at your own will. The build process also enable some sort of cross compiling, since you can only choose
a specific processor variation of the same type (e.g. core2, athlon64, which are both an x86 architecture). Real cross compiling (e.g. building the windows
version on a linux platform) has not been tested.
By default, no processor is specified, so Cmake/GCC will build RT for your processor (or maybe a generic processor). Developers that are providing build to
download then have to set the processor label manually (set to 'undefined' by default) with the PROC_FORCED_LABEL cmake's parameter (we assume that you know
how to specify a cmake parameter).
Windows Windows
------- -------
@ -28,6 +44,13 @@ Windows
Compile: Compile:
- Enter the root directory of the RawTherapee source tree - Enter the root directory of the RawTherapee source tree
- Type: cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./release -DBINDIR=. -DDATADIR=. -DLIBDIR=. - Type: cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./release -DBINDIR=. -DDATADIR=. -DLIBDIR=.
If you wants to upload a build, you should set some additionnal information about your processor. There are two possibilities:
1. You pickup a target processor from "ProcessorTargets.cmake": all you have to do is adding "-D PROC_TARGET_NUMBER:STRING=number"
to cmake's command line
If you choose the 'native' solution's number, you have to set the processor label manually by setting "-D PROC_FORCED_LABEL:STRING=procLabel"
in cmake's command line
Please provide a short name, like "core i5" or "athlon64" (without double quote)... processor frequency if of no use.
2. You don't need specific processor flags, you still have to set the PROC_FORCED_LABEL parameter (see point 1 righ above)
- Type: mingw32-make.exe install - Type: mingw32-make.exe install
- You find the compiled program in the "release" directory - You find the compiled program in the "release" directory
@ -67,6 +90,13 @@ Linux
Enter root directory of RawTherapee source tree from a terminal window. Enter root directory of RawTherapee source tree from a terminal window.
configure the source for Eclipse with: configure the source for Eclipse with:
cmake -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_INSTALL_PREFIX=./release -DBINDIR=. -DDATADIR=. -DLIBDIR=. -DCMAKE_BUILD_TYPE=Release cmake -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_INSTALL_PREFIX=./release -DBINDIR=. -DDATADIR=. -DLIBDIR=. -DCMAKE_BUILD_TYPE=Release
If you wants to upload a build, you should set some additionnal information about your processor. There are two possibilities:
1. You pickup a target processor from "ProcessorTargets.cmake": all you have to do is adding "-D PROC_TARGET_NUMBER:STRING=number"
to cmake's command line
If you choose the 'native' solution's number, you have to set the processor label manually by setting "-D PROC_FORCED_LABEL:STRING=procLabel"
in cmake's command line
Please provide a short name, like "core i5" or "athlon64" (without double quote)... processor frequency if of no use.
2. You don't need specific processor flags, you still have to set the PROC_FORCED_LABEL parameter (see point 1 righ above)
Eclipse does not do 'make install' but only 'make all' so to get the release there are 2 ways. Eclipse does not do 'make install' but only 'make all' so to get the release there are 2 ways.
1. type 'make install' in the console or, 1. type 'make install' in the console or,
@ -94,6 +124,13 @@ Compile:
- Enter root directory of RawTherapee source tree - Enter root directory of RawTherapee source tree
- Type: cmake -D CMAKE_C_COMPILER=gcc-mp-4.5 -D CMAKE_CXX_COMPILER=g++-mp-4.5 . (to enable OpenMP, assuming you have installed gcc45) OR: - Type: cmake -D CMAKE_C_COMPILER=gcc-mp-4.5 -D CMAKE_CXX_COMPILER=g++-mp-4.5 . (to enable OpenMP, assuming you have installed gcc45) OR:
cmake -D OPTION_OMP=false . (to disable OpenMP and use the default compiler) cmake -D OPTION_OMP=false . (to disable OpenMP and use the default compiler)
If you wants to upload a build, you should set some additionnal information about your processor. There are two possibilities:
1. You pickup a target processor from "ProcessorTargets.cmake": all you have to do is adding "-D PROC_TARGET_NUMBER:STRING=number"
to cmake's command line
If you choose the 'native' solution's number, you have to set the processor label manually by setting "-D PROC_FORCED_LABEL:STRING=procLabel"
in cmake's command line
Please provide a short name, like "core i5" or "athlon64" (without double quote)... processor frequency if of no use.
2. You don't need specific processor flags, you still have to set the PROC_FORCED_LABEL parameter (see point 1 righ above)
- Type: make install - Type: make install
- Type: ./tools/osx/make-app-bundle - Type: ./tools/osx/make-app-bundle
- You will find a RawTherapee.dmg file in release/ folder; this is the distribution release and can be run on any machine which meets the - You will find a RawTherapee.dmg file in release/ folder; this is the distribution release and can be run on any machine which meets the