Correction of a bug about the libtiff build that wasn't handling compression features + correction of a bug in the build process of Windows 64bit version + updated COMPILE.txt

WARNING: Now all Windows developers/builders have to update Cmake to 2.8.4 at least.
This commit is contained in:
Hombre
2011-03-31 01:14:36 +02:00
parent 3eb0e0a040
commit a1281c2de5
5 changed files with 145 additions and 50 deletions

View File

@@ -1,4 +1,9 @@
cmake_minimum_required(VERSION 2.6) if (WIN32)
cmake_minimum_required(VERSION 2.8.4)
cmake_policy(SET CMP0015 OLD)
else (WIN32)
cmake_minimum_required(VERSION 2.6)
endif (WIN32)
# the default target is 'Debug' # the default target is 'Debug'
if (CMAKE_BUILD_TYPE STREQUAL "") if (CMAKE_BUILD_TYPE STREQUAL "")
@@ -46,7 +51,7 @@ option (AUTOMATED_BUILD_SYSTEM "TRUE if built by an automate" OFF)
option (BUILD_SHARED "Build rawtherapee with shared libraries" OFF) option (BUILD_SHARED "Build rawtherapee with shared libraries" OFF)
option (WITH_RAWZOR "Build with Rawzor support" OFF) option (WITH_RAWZOR "Build with Rawzor support" OFF)
option (WITH_MYFILE_MMAP "Build using memory mapped file" OFF) option (WITH_MYFILE_MMAP "Build using memory mapped file" ON)
option (OPTION_OMP "Build with OpenMP support" ON) option (OPTION_OMP "Build with OpenMP support" ON)
# set install directories # set install directories
@@ -134,7 +139,7 @@ if (WIN32)
endif (MINGW) endif (MINGW)
else (WIN32) else (WIN32)
pkg_check_modules (IPTCDATA REQUIRED libiptcdata) pkg_check_modules (IPTCDATA REQUIRED libiptcdata)
pkg_check_modules (LCMS REQUIRED lcms) pkg_check_modules (LCMS REQUIRED lcms<=1.99)
find_package (JPEG REQUIRED) find_package (JPEG REQUIRED)
find_package (PNG REQUIRED) find_package (PNG REQUIRED)
find_package (TIFF REQUIRED) find_package (TIFF REQUIRED)
@@ -230,10 +235,10 @@ if (WITH_MYFILE_MMAP)
endif (WITH_MYFILE_MMAP) endif (WITH_MYFILE_MMAP)
if (OPTION_OMP) if (OPTION_OMP)
find_package(OpenMP) find_package(OpenMP)
if (OPENMP_FOUND) if (OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif (OPENMP_FOUND) endif (OPENMP_FOUND)
endif (OPTION_OMP) endif (OPTION_OMP)
if (UNIX) if (UNIX)

View File

@@ -1,6 +1,5 @@
If you have problems with the compilation, identified the reason and fixed If you have problems with the compilation, please ask on the appropriated RawTherapee forum :
the bug, please send me the updated build scripts (CMakeLists.txt files) to: http://www.rawtherapee.com/forum/viewforum.php?f=10
hgabor@rawtherapee.com
Preamble: Preamble:
--------- ---------
@@ -22,33 +21,80 @@ certainly only use the source code without any access to a Mercurial repository.
the build information files, then you can tell your build system to run cmake with the following additionnal parameter : -D AUTOMATED_BUILD_SYSTEM:BOOL=ON. the build information files, then you can tell your build system to run cmake with the following additionnal parameter : -D AUTOMATED_BUILD_SYSTEM:BOOL=ON.
Cmake will then pass the files creation step, but will check the presence of the requested files and stop if they're not there. Cmake will then pass the files creation step, but will check the presence of the requested files and stop if they're not there.
Windows Windows
------- -------
METHOD 1: The toolchain:
Requirements:
- MinGW + MSYS
- CMake
- GTK and GTKMM development environments
Compile:
- Start MSYS
- Enter the root directory of the RawTherapee source tree
- Type: cmake -G "MSYS Makefiles" .
- Type: make install
- You find the compiled program in the release directory
METHOD 2: There is 2 method to compile RawTherapee, and they each rely on different and common packages. They are
Requirements: now referred to METHOD 1 and METHOD 2.
- tdm-gcc (http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-4.5.1.exe/download) Of course, you'll have to install the package for the build method explained later in this document.
- cmake (http://www.cmake.org/cmake/resources/software.html)
- mercurial (http://mercurial.selenic.com/wiki/WindowsInstall) The rest of this document assumes that you've installed MinGW, MSYS and Gtkmm respectively to "C:\mingw",
- gtkmm (http://ftp.se.debian.org/pub/gnome/binaries/win32/gtkmm/2.22/) "C:\msys" and "C:\gtkmm".
This tutorial assume that you've installed the packages in paths THAT DOES NOT CONTAIN SPACES.
Compile:
- Enter the root directory of the RawTherapee source tree METHOD 1:
- Type: cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./release -DBINDIR=. -DDATADIR=. -DLIBDIR=. - MinGW-TDM (http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-4.5.1.exe/download)
OpenMP seems to be broken in TDM-GCC4.5.1, so when MinGW has been installed, download and install
libgomp form tdm-gcc-4.5.0
(http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%204.5%20series/Previous/4.5.0-tdm-1%20SJLJ/gcc-4.5.0-tdm-1-openmp.zip/download)
- MSYS (http://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe)
If you have some trouble installing MSYS, see here : http://www.mingw.org/wiki/MSYS
- CMake (http://www.cmake.org/cmake/resources/software.html)
Version 2.8.4 or above si required for this platform
- Gtkmm2.22 (http://ftp.se.debian.org/pub/gnome/binaries/win32/gtkmm/2.22/)
METHOD 2:
- MinGW-TDM (http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-4.5.1.exe/download)
- CMake (http://www.cmake.org/cmake/resources/software.html)
- Gtkmm2.22 (http://ftp.se.debian.org/pub/gnome/binaries/win32/gtkmm/2.22/)
Additionnal steps:
When all the packages of your preferred method are installed:
- set the GTKMM_BASEPATH user or system environment variable to the installation directory of Gtkmm
(the Gtkmm's installer can do it for you)
- set the MINGW_BASEPATH user or system environment variable to the installation directory of MinGW32
- set the PKG_CONFIG_PATH user or system environment variable to the location of the pkgconfig directories:
c:\mingw\lib\pkgconfig;c:\gtkmm\lib\pkgconfig
You have to restart the console to take this new variables into account
- Copy the "Win32CMakeOptions-sample.txt" file located in the root directory of RT's source tree, to "cmo.txt" (e.g.)
You can edit that copy to change the compilation flags to your needs, but the default values should be fine.
However, 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 set the PROC_TARGET_NUMBER parameter in cmo.txt
to the right target number.
If you choose the 'native' solution, you have to set the processor label manually in cmo.txt, by uncommenting and set the PROC_FORCED_LABEL
parameter. 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, so you'll let PROC_TARGET_NUMBER set to 0, but you have to set the PROC_FORCED_LABEL parameter
in cmo.txt (don't forget to uncomment the line). Please provide a short name, like "core i5" or "athlon64" (without double quote)... processor
frequency if of no use.
Building RT:
METHOD 1:
Requirements:
- MinGW + MSYS
- CMake
- GTK and GTKMM development environments
Compile:
- Start an MSYS command line interface
- Enter the root directory of the RawTherapee source tree (type: cd "/C/Absolute/Path/To/RawTherapee_sourceTree")
- Type: cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -Ccmo.txt .
- Type: make install
- You'll find the compiled program in the subdirectory named like the value of CMAKE_BUILD_TYPE ("Release" in this example)
METHOD 2:
Requirements:
- MinGW-TDM (http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-4.5.1.exe/download)
- CMake (http://www.cmake.org/cmake/resources/software.html)
- Mercurial (http://mercurial.selenic.com/wiki/WindowsInstall)
- Gtkmm (http://ftp.se.debian.org/pub/gnome/binaries/win32/gtkmm/2.22/)
Compile:
- Start a standard DOS command line interface (WIN + "R" -> "cmd")
- Enter the root directory of the RawTherapee source tree (type: cd C:\Absolute\Path\To\RawTherapee_sourceTree)
If you wants to upload a build, you should set some additionnal information about your processor. There are two possibilities: 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" 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 to cmake's command line
@@ -56,8 +102,8 @@ Windows
in cmake's command line in cmake's command line
Please provide a short name, like "core i5" or "athlon64" (without double quote)... processor frequency if of no use. 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) 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'll find the compiled program in the subdirectory named like the value of CMAKE_BUILD_TYPE ("Release" in this example)
Linux Linux
----- -----
@@ -74,9 +120,10 @@ Linux
Compile: Compile:
- Enter the root directory of the RawTherapee source tree - Enter the root directory of the RawTherapee source tree
- Type: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./release -DBINDIR=. -DDATADIR=. -DLIBDIR=. - Type: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./release -DBINDIR=. -DDATADIR=. -DLIBDIR=.
developers that wants to provide a build has to set the PROC_FORCED_LABEL to their processor name, e.g.:
cmake -DPROC_FORCED_LABEL:STRING=athlon64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./release -DBINDIR=. -DDATADIR=. -DLIBDIR=.
- Type: make install - Type: make install
- You find the compiled program in the release directory (you can copy it - You find the compiled program in the release directory (you can copy it anywhere you want)
anywhere you want)
(By changing the cmake flags, you can change where the release is. By removing all flags it should go to the standard system install location). (By changing the cmake flags, you can change where the release is. By removing all flags it should go to the standard system install location).
@@ -87,7 +134,7 @@ Linux
click Help -> Install new Software. click Help -> Install new Software.
The Eclipse Update Site for MercurialEclipse is available at this URL: The Eclipse Update Site for MercurialEclipse is available at this URL:
http://cbes.javaforge.com/update http://cbes.javaforge.com/update
Import the rawtherapee mercurial repository: Import the rawtherapee mercurial repository:
File->new->'other'->mercurial->Clone existing repository File->new->'other'->mercurial->Clone existing repository
fill in URL: https://rawtherapee.googlecode.com/hg fill in URL: https://rawtherapee.googlecode.com/hg
@@ -107,23 +154,20 @@ Linux
1. type 'make install' in the console or, 1. type 'make install' in the console or,
2. in 'Project'->'properties'->'C/C++ Make Project'->'Build (incremental build)' change 'all' to 'install' 2. in 'Project'->'properties'->'C/C++ Make Project'->'Build (incremental build)' change 'all' to 'install'
...
OSX OSX
--- ---
Requirements: Requirements:
- XCode Development Tools (you only need a subset of these, but it is probably easier to just install all of them) - XCode Development Tools (you only need a subset of these, but it is probably easier to just install all of them)
- MacPorts - MacPorts
- Set /opt/local/etc/macports/variants.conf to include "+no_x11 +quartz" - Set /opt/local/etc/macports/variants.conf to include "+no_x11 +quartz"
- If you want to build for multiple architectures, add +universal to variants.conf. Note that this will increase the size of the final application substantially. - If you want to build for multiple architectures, add +universal to variants.conf. Note that this will increase the size of the final application substantially.
- Set /opt/local/etc/macports/macports.conf key 'universal_archs' to the architectures you wish to build for. Possible values - Set /opt/local/etc/macports/macports.conf key 'universal_archs' to the architectures you wish to build for. Possible values
include "i386 x86_64 ppc ppc64" include "i386 x86_64 ppc ppc64"
- Edit beginning of CMakeLists.txt to enable the same architectures as you added to variants.conf - Edit beginning of CMakeLists.txt to enable the same architectures as you added to variants.conf
- Run "sudo port install cairomm pango-devel gtk2 cmake glibmm gtkmm lcms libiptcdata" to install all needed libraries and tools - Run "sudo port install cairomm pango-devel gtk2 cmake glibmm gtkmm lcms libiptcdata" to install all needed libraries and tools
- If you don't already have Mercurial installed, run "sudo port install mercurial" - If you don't already have Mercurial installed, run "sudo port install mercurial"
- If you want to try OpenMP builds, run "sudo port install gcc45" - If you want to try OpenMP builds, run "sudo port install gcc45"
Compile: Compile:
- Enter root directory of RawTherapee source tree - Enter root directory of RawTherapee source tree

View File

@@ -0,0 +1,46 @@
# Use the 'Debug' build type to have a non optimized, with debugging information, with a console executable
# Use the 'Release' build type to have an optimized, without debugging information, console free executable
# Use the 'RelWithDebInfo' build type to have an optimized, without debugging information, with a console executable
# Use the 'MinSizeRel' build type to have the smallest possible, without debugging information, console free executable
#set(CMAKE_BUILD_TYPE Release CACHE STRING "Between: None Debug Release RelWithDebInfo MinSizeRel.")
set(CMAKE_INSTALL_PREFIX ./Builds/${CMAKE_BUILD_TYPE} CACHE PATH "Libraries installation path")
set(DATADIR . CACHE PATH "Datas installation path")
set(BINDIR . CACHE PATH "Binaries installation path")
set(LIBDIR . CACHE PATH "Libraries installation path")
set(DOCDIR ./doc CACHE PATH "Documentation installation path")
set(CREDITSDIR . CACHE PATH "Credit file installation path")
set(LICENCEDIR . CACHE PATH "Licence file installation path")
set(BUILD_SHARED OFF CACHE BOOL "Should RT generate shared libraries")
set(WITH_RAWZOR ON CACHE BOOL "With Rawzor")
set(OPTION_OMP ON CACHE BOOL "Use OpenMP to speedup the preview and batch processing")
# set WITH_MYFILE_MMAP to OFF if you experience crash with thumbnail creation (it should be slower, but more reliable)
set(WITH_MYFILE_MMAP ON CACHE BOOL "Use the MMAP mechanism to speedup thumbnail creations")
# This line will let you chose the target number, and the associated processor
set (PROC_TARGET_NUMBER 0 CACHE STRING "Target Processor")
# If you want to force the target processor name, uncomment the next line, and replace labelWithoutQuotes by its value
#set (PROC_FORCED_LABEL labelWithoutQuotes CACHE STRING "Target Processor label")
set(CMAKE_CXX_FLAGS "-mwin32 -mthreads" CACHE STRING "Compiler options for C++ source files")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g2" CACHE STRING "Compiler options for C++ source files and Debug target")
set(CMAKE_CXX_FLAGS_RELEASE "-mwindows -DNDEBUG -O2" CACHE STRING "Compiler options for C++ source files and Release target")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-mwindows -DNDEBUG -Os" CACHE STRING "Compiler options for C++ source files and MinSizeRel target")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Compiler options for C++ source files and RelWithDebInfo target")
# Uncomment the next line and set the right value to override the default value (special compiling flags for RTEngine)
#set(RTENGINE_CXX_FLAGS "-funroll-loops" CACHE STRING "Special compilation flags for RTEngine")
set(CMAKE_C_FLAGS "-mwin32 -mthreads" CACHE STRING "Compiler options for C source files")
set(CMAKE_C_FLAGS_DEBUG "-O0 -g2" CACHE STRING "Compiler options for C source files and Debug target")
set(CMAKE_C_FLAGS_RELEASE "-mwindows -DNDEBUG -O2" CACHE STRING "Compiler options for C source files and Release target")
set(CMAKE_C_FLAGS_MINSIZEREL "-mwindows -DNDEBUG -Os" CACHE STRING "Compiler options for C source files and MinSizeRel target")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Compiler options for C source files and RelWithDebInfo target")
set(CMAKE_EXE_LINKER_FLAGS "-mwin32 -mthreads -mthread -static-libgcc -static-libstdc++" CACHE STRING "Linker options")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-O0" CACHE STRING "Linkage options for the Debug target")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-mwindows -s -O2" CACHE STRING "Linkage options for the Release target")
set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-mwindows -s -Os" CACHE STRING "Linkage options for the MinSizeRel target")
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "-s -O2" CACHE STRING "Linkage options for the RelWithDebInfo target")

View File

@@ -32,7 +32,7 @@ set (BASESOURCEFILES
popupcommon.cc popupbutton.cc popuptogglebutton.cc) popupcommon.cc popupbutton.cc popuptogglebutton.cc)
if (WIN32) if (WIN32)
set (EXTRA_SRC windirmonitor.cc myicon.o) set (EXTRA_SRC windirmonitor.cc myicon.rc)
include_directories ( ../rtengine ${CMAKE_CURRENT_BINARY_DIR} . ../rtexif ${EXTRA_INCDIR} ${GLIB2_INCLUDE_DIRS} ${GLIBMM_INCLUDE_DIRS} include_directories ( ../rtengine ${CMAKE_CURRENT_BINARY_DIR} . ../rtexif ${EXTRA_INCDIR} ${GLIB2_INCLUDE_DIRS} ${GLIBMM_INCLUDE_DIRS}
${GTK_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS} ${GIO_INCLUDE_DIRS} ${GIOMM_INCLUDE_DIRS}) ${GTK_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS} ${GIO_INCLUDE_DIRS} ${GIOMM_INCLUDE_DIRS})
link_directories (. ../rtexif ${EXTRA_LIBDIR} ${GLIB2_LIBRARY_DIRS} ${GLIBMM_LIBRARY_DIRS} link_directories (. ../rtexif ${EXTRA_LIBDIR} ${GLIB2_LIBRARY_DIRS} ${GLIBMM_LIBRARY_DIRS}

Binary file not shown.