From ab6b13fbd51ddcd069572bd0058a86c751ee8c76 Mon Sep 17 00:00:00 2001 From: jeblanchard Date: Sun, 8 Jun 2008 11:36:51 +0000 Subject: [PATCH] Fix release/debug in cmake --- cmake/cross-mingw32/debug/CMakeLists.txt | 1 + cmake/cross-mingw32/release/CMakeLists.txt | 1 + cmake/fceux.cmake | 3 +++ cmake/native/debug/CMakeLists.txt | 1 + cmake/native/release/CMakeLists.txt | 1 + 5 files changed, 7 insertions(+) diff --git a/cmake/cross-mingw32/debug/CMakeLists.txt b/cmake/cross-mingw32/debug/CMakeLists.txt index 15616426..4ed85291 100644 --- a/cmake/cross-mingw32/debug/CMakeLists.txt +++ b/cmake/cross-mingw32/debug/CMakeLists.txt @@ -1,3 +1,4 @@ project("fceux: cross-mingw32 debug") +set(CMAKE_BUILD_TYPE debug) set(FCEUX_EXE_NAME fceuxDBG.exe) include(${CMAKE_SOURCE_DIR}/cmake/cross-mingw32/fceux_cross-mingw32.cmake) diff --git a/cmake/cross-mingw32/release/CMakeLists.txt b/cmake/cross-mingw32/release/CMakeLists.txt index 7daf882b..0e32033f 100644 --- a/cmake/cross-mingw32/release/CMakeLists.txt +++ b/cmake/cross-mingw32/release/CMakeLists.txt @@ -1,3 +1,4 @@ project("fceux: cross-mingw32 release") +set(CMAKE_BUILD_TYPE release) set(FCEUX_EXE_NAME fceuxREL.exe) include(${CMAKE_SOURCE_DIR}/cmake/cross-mingw32/fceux_cross-mingw32.cmake) diff --git a/cmake/fceux.cmake b/cmake/fceux.cmake index 2be10dfc..373a088b 100644 --- a/cmake/fceux.cmake +++ b/cmake/fceux.cmake @@ -315,6 +315,9 @@ endif(APPLE) if(MINGW) add_definitions( -DNEED_MINGW_HACKS -D_WIN32_IE=0x0600 ) endif(MINGW) +if(CMAKE_BUILD_TYPE STREQUAL "debug") + add_definitions( -D_DEBUG ) +endif(CMAKE_BUILD_TYPE STREQUAL "debug") if(CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-write-strings -Wno-sign-compare") endif(CMAKE_COMPILER_IS_GNUCXX) diff --git a/cmake/native/debug/CMakeLists.txt b/cmake/native/debug/CMakeLists.txt index f12195b7..d21d1f2b 100644 --- a/cmake/native/debug/CMakeLists.txt +++ b/cmake/native/debug/CMakeLists.txt @@ -1,3 +1,4 @@ project("fceux: native debug") +set(CMAKE_BUILD_TYPE debug) set(FCEUX_EXE_NAME fceuxDBG) include(${CMAKE_SOURCE_DIR}/cmake/native/fceux_native.cmake) diff --git a/cmake/native/release/CMakeLists.txt b/cmake/native/release/CMakeLists.txt index d9a2a932..4f78c90a 100644 --- a/cmake/native/release/CMakeLists.txt +++ b/cmake/native/release/CMakeLists.txt @@ -1,3 +1,4 @@ project("fceux: native release") +set(CMAKE_BUILD_TYPE release) set(FCEUX_EXE_NAME fceuxREL) include(${CMAKE_SOURCE_DIR}/cmake/native/fceux_native.cmake)