--- a/CMakeLists.txt Tue Mar 19 10:39:05 2013 +0100
+++ b/CMakeLists.txt Tue Mar 19 10:43:45 2013 +0100
@@ -160,7 +160,7 @@
find_package(SDL_mixer REQUIRED)
set(DYLIB_SMPEG "-dylib_file @loader_path/Frameworks/smpeg.framework/Versions/A/smpeg:${SDLMIXER_LIBRARY}/Versions/A/Frameworks/smpeg.framework/Versions/A/smpeg")
set(DYLIB_MIKMOD "-dylib_file @loader_path/Frameworks/mikmod.framework/Versions/A/mikmod:${SDLMIXER_LIBRARY}/Versions/A/Frameworks/mikmod.framework/Versions/A/mikmod")
- set(CMAKE_C_FLAGS "${DYLIB_SMPEG} ${DYLIB_MIKMOD}")
+ add_flag_append(CMAKE_C_FLAGS "${DYLIB_SMPEG} ${DYLIB_MIKMOD}")
add_flag_append(CMAKE_Pascal_FLAGS "-k${DYLIB_SMPEG}" "-k${DYLIB_MIKMOD}")
endif()
@@ -209,12 +209,12 @@
#set default flags values for all projects (unless MINIMAL_CFLAGS is true)
if(NOT ${MINIMAL_CFLAGS})
- set(CMAKE_C_FLAGS "-pipe ${CMAKE_C_FLAGS}")
- set(CMAKE_C_FLAGS_RELEASE "-w -Os -fomit-frame-pointer ${CMAKE_C_FLAGS_RELEASE}")
- set(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG ${CMAKE_C_FLAGS_DEBUG}")
- set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
- set(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
- set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
+ add_flag_append(CMAKE_C_FLAGS "-pipe")
+ add_flag_append(CMAKE_C_FLAGS_RELEASE "-w -Os -fomit-frame-pointer")
+ add_flag_append(CMAKE_C_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG")
+ add_flag_append(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
+ add_flag_append(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
+ add_flag_append(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
else()
#CMake adds a lot of additional configuration flags, so let's clear them up
set(CMAKE_C_FLAGS_RELEASE "")
@@ -230,7 +230,7 @@
if(HAVE_NOEXECSTACK)
add_flag_append(CMAKE_Pascal_FLAGS "-k-z -knoexecstack")
if(NOT ${MINIMAL_CFLAGS})
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_REQUIRED_FLAGS}")
+ add_flag_append(CMAKE_C_FLAGS ${CMAKE_REQUIRED_FLAGS})
endif()
endif()
unset(CMAKE_REQUIRED_FLAGS)