summaryrefslogtreecommitdiff
blob: 817cd39dcb4fa230dfcbf89ea1f1dfc2b22e1229 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- freesynd-0.7.1/CMakeLists.txt
+++ freesynd-0.7.1/CMakeLists.txt
@@ -34,6 +34,13 @@
 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_C_FLAGS}")
 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXX_FLAGS}")
 
+option(BUILD_DEV_TOOLS "Build development tools")
+option(WITH_DEBUG "Enable debug definitions")
+
+if(WITH_DEBUG)
+	add_definitions (-D_DEBUG)
+endif()
+
 # Set standard definitions for all platforms.
 add_definitions (-DSYSTEM_SDL)
 add_definitions (-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\")
@@ -59,10 +66,7 @@
 	message (FATAL_ERROR "Unable to locate PNG")
 endif ()
 
-if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "debug")
-	set (BUILD_DEV_TOOLS TRUE)
-else ()
-	set (BUILD_DEV_TOOLS FALSE)
+if (CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE STREQUAL "debug")
 	# We only define an install target if we're doing a release build.
 	# Furthermore, on Mac, the data folder is a part of the app bundle.
 	if (NOT APPLE)