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'
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 (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)
# set install directories
@@ -134,7 +139,7 @@ if (WIN32)
endif (MINGW)
else (WIN32)
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 (PNG REQUIRED)
find_package (TIFF REQUIRED)

View File

@@ -1,6 +1,5 @@
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:
hgabor@rawtherapee.com
If you have problems with the compilation, please ask on the appropriated RawTherapee forum :
http://www.rawtherapee.com/forum/viewforum.php?f=10
Preamble:
---------
@@ -22,10 +21,57 @@ 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.
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
-------
The toolchain:
There is 2 method to compile RawTherapee, and they each rely on different and common packages. They are
now referred to METHOD 1 and METHOD 2.
Of course, you'll have to install the package for the build method explained later in this document.
The rest of this document assumes that you've installed MinGW, MSYS and Gtkmm respectively to "C:\mingw",
"C:\msys" and "C:\gtkmm".
This tutorial assume that you've installed the packages in paths THAT DOES NOT CONTAIN SPACES.
METHOD 1:
- 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
@@ -33,22 +79,22 @@ Windows
- GTK and GTKMM development environments
Compile:
- Start MSYS
- Enter the root directory of the RawTherapee source tree
- Type: cmake -G "MSYS Makefiles" .
- 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 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)
METHOD 2:
Requirements:
- tdm-gcc (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/)
- 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:
- 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=.
- 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:
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
@@ -57,7 +103,7 @@ Windows
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
- 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
-----
@@ -74,9 +120,10 @@ Linux
Compile:
- Enter the root directory of the RawTherapee source tree
- 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
- You find the compiled program in the release directory (you can copy it
anywhere you want)
- You find the compiled program in the release directory (you can copy it 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).
@@ -107,9 +154,6 @@ Linux
1. type 'make install' in the console or,
2. in 'Project'->'properties'->'C/C++ Make Project'->'Build (incremental build)' change 'all' to 'install'
...
OSX
---

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)
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}
${GTK_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS} ${GIO_INCLUDE_DIRS} ${GIOMM_INCLUDE_DIRS})
link_directories (. ../rtexif ${EXTRA_LIBDIR} ${GLIB2_LIBRARY_DIRS} ${GLIBMM_LIBRARY_DIRS}

Binary file not shown.