Line
Link Here
|
0 |
-- a/CMakeLists.txt |
0 |
++ b/CMakeLists.txt |
Lines 11-19
Link Here
|
11 |
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) |
11 |
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) |
12 |
|
12 |
|
13 |
project(enblend) |
13 |
project(enblend) |
14 |
IF(NOT MSVC) |
|
|
15 |
SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel" FORCE) |
16 |
ENDIF(NOT MSVC) |
17 |
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ |
14 |
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ |
18 |
# is checked |
15 |
# is checked |
19 |
# For now, reuse the hugin modules directory |
16 |
# For now, reuse the hugin modules directory |
Lines 130-136
Link Here
|
130 |
ENDIF() |
127 |
ENDIF() |
131 |
|
128 |
|
132 |
IF(CMAKE_COMPILER_IS_GNUCXX) |
129 |
IF(CMAKE_COMPILER_IS_GNUCXX) |
133 |
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -ffast-math -DNDEBUG -Wall") |
|
|
134 |
IF(APPLE AND CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 5) |
130 |
IF(APPLE AND CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 5) |
135 |
## Add needed Compiler and Linker flags for OSX |
131 |
## Add needed Compiler and Linker flags for OSX |
136 |
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flat_namespace -undefined suppress") |
132 |
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flat_namespace -undefined suppress") |
Lines 154-173
Link Here
|
154 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") |
150 |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") |
155 |
ENDIF(CMAKE_CL_64) |
151 |
ENDIF(CMAKE_CL_64) |
156 |
|
152 |
|
157 |
# compile everything for the static C runtime |
|
|
158 |
FOREACH(TYPE C CXX) |
159 |
# makefiles use blank configuration |
160 |
FOREACH(CFG "_DEBUG" "_MINSIZEREL" "_RELEASE" "_RELWITHDEBINFO") |
161 |
#MESSAGE("Replacing CMAKE_${TYPE}_FLAGS${CFG}: ${CMAKE_${TYPE}_FLAGS${CFG}}") |
162 |
SET(NEW_FLAGS "${CMAKE_${TYPE}_FLAGS${CFG}}") |
163 |
# fix up static libc flags |
164 |
STRING(REPLACE "/MD" "/MT" NEW_FLAGS "${NEW_FLAGS}") |
165 |
# *FORCE* to override whats already placed into the cache |
166 |
SET(CMAKE_${TYPE}_FLAGS${CFG} "${NEW_FLAGS}" CACHE STRING |
167 |
"CMAKE_${TYPE}_FLAGS${CFG} (overwritten to ensure static build)" FORCE) |
168 |
#MESSAGE("New CMAKE_${TYPE}_FLAGS${CFG}: ${CMAKE_${TYPE}_FLAGS${CFG}}") |
169 |
ENDFOREACH(CFG) |
170 |
ENDFOREACH(TYPE) |
171 |
# link only with the static C runtime !! THIS IS A MUST !! |
153 |
# link only with the static C runtime !! THIS IS A MUST !! |
172 |
SET(NEW_FLAGS "${CMAKE_EXE_LINKER_FLAGS}") |
154 |
SET(NEW_FLAGS "${CMAKE_EXE_LINKER_FLAGS}") |
173 |
# ensure that the flags are not duplicated on subsequent runs |
155 |
# ensure that the flags are not duplicated on subsequent runs |
174 |
-- a/doc/CMakeLists.txt |
156 |
++ b/doc/CMakeLists.txt |
Lines 406-412
Link Here
|
406 |
"${CMAKE_BINARY_DIR}/doc/enfuse.html" |
406 |
"${CMAKE_BINARY_DIR}/doc/enfuse.html" |
407 |
${ENBLEND_PNGFILES} |
407 |
${ENBLEND_PNGFILES} |
408 |
${ENFUSE_PNGFILES} |
408 |
${ENFUSE_PNGFILES} |
409 |
DESTINATION ${DocumentsDirectory} |
409 |
DESTINATION ${DocumentsDirectory}/html |
410 |
) |
410 |
) |
411 |
endif() |
411 |
endif() |
412 |
|
412 |
|
413 |
-- a/src/CMakeLists.txt |
413 |
++ b/src/CMakeLists.txt |
Lines 141-147
Link Here
|
141 |
set_target_properties(enblend PROPERTIES LINK_FLAGS "/DELAYLOAD:opencl.dll") |
141 |
set_target_properties(enblend PROPERTIES LINK_FLAGS "/DELAYLOAD:opencl.dll") |
142 |
set_target_properties(enfuse PROPERTIES LINK_FLAGS "/DELAYLOAD:opencl.dll") |
142 |
set_target_properties(enfuse PROPERTIES LINK_FLAGS "/DELAYLOAD:opencl.dll") |
143 |
endif() |
143 |
endif() |
144 |
install(TARGETS enblend enfuse DESTINATION bin CONFIGURATIONS Release RelWithDebInfo MinSizeRel) |
144 |
install(TARGETS enblend enfuse DESTINATION bin) |
145 |
|
145 |
|
146 |
IF(ENABLE_OPENCL AND NOT ${PREFER_SEPARATE_OPENCL_SOURCE}) |
146 |
IF(ENABLE_OPENCL AND NOT ${PREFER_SEPARATE_OPENCL_SOURCE}) |
147 |
add_dependencies(enblend cl_sources) |
147 |
add_dependencies(enblend cl_sources) |