--- a/CMakeLists.txt Wed Jun 12 11:27:00 2013 +0200
+++ b/CMakeLists.txt Wed Jun 12 12:03:04 2013 +0200
@@ -79,9 +79,9 @@
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})
+ set(CMAKE_CXX_FLAGS "-pipe ${CMAKE_CXX_FLAGS}")
+ set(CMAKE_CXX_FLAGS_RELEASE "-w -Os -fomit-frame-pointer ${CMAKE_CXX_FLAGS_RELEASE}")
+ set(CMAKE_CXX_FLAGS_DEBUG "-Wall -O0 -g -DDEBUG ${CMAKE_CXX_FLAGS_DEBUG}")
else()
#CMake adds a lot of additional configuration flags, so let's clear them up
set(CMAKE_C_FLAGS_RELEASE "")
--- a/cmake_modules/compilerchecks.cmake Wed Jun 12 11:27:00 2013 +0200
+++ b/cmake_modules/compilerchecks.cmake Wed Jun 12 12:03:04 2013 +0200
@@ -16,7 +16,7 @@
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-all -fstack-protector")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fstack-protector-all -fstack-protector")
set(CMAKE_SHARED_LIBRARY_C_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS} -fstack-protector-all -fstack-protector")
- set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS} -fstack-protector-all -fstack-protector")
+ set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS} -fstack-protector-all -fstack-protector")
endif()
#symbol visibility, not supported on Windows (so we error out to avoid spam)
--- a/cmake_modules/platform.cmake Wed Jun 12 11:27:00 2013 +0200
+++ b/cmake_modules/platform.cmake Wed Jun 12 12:03:04 2013 +0200
@@ -36,7 +36,8 @@
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}")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DYLIB_SMPEG} ${DYLIB_MIKMOD}")
+ set(CMAKE_CX_FLAGS "${CMAKE_CX_FLAGS} ${DYLIB_SMPEG} ${DYLIB_MIKMOD}")
list(APPEND pascal_flags "-k${DYLIB_SMPEG}" "-k${DYLIB_MIKMOD}")
endif()
@@ -75,7 +76,8 @@
if(MINGW)
#this flags prevents a few dll hell problems
- set(CMAKE_C_FLAGS "-static-libgcc ${CMAKE_C_FLAGS}")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc ")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc ")
endif(MINGW)
if(WIN32)