/[pcsx2_0.9.7]/trunk/3rdparty/SoundTouch/CMakeLists.txt
ViewVC logotype

Diff of /trunk/3rdparty/SoundTouch/CMakeLists.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/3rdparty/SoundTouch/CMakeLists.txt	2010/09/07 06:28:05	61
+++ trunk/3rdparty/SoundTouch/CMakeLists.txt	2010/09/07 11:08:22	62
@@ -1,24 +1,34 @@
 # SoundTouch library
 
 # library name
-set(SoundTouchName SoundTouch)
+set(Output pcsx2_SoundTouch)
+
+set(CommonFlags
+    -march=athlon-xp
+    -march=prescott
+    )
+
+set(OptimizationFlags
+    -Os
+    -W
+    )
 
 # Debug - Build
 if(CMAKE_BUILD_TYPE STREQUAL Debug)
 	# add defines
-	add_definitions(-g -O0 -march=athlon-xp -march=prescott -m32)
+	add_definitions(${CommonFlags} -g)
 endif(CMAKE_BUILD_TYPE STREQUAL Debug)
 
 # Devel - Build
 if(CMAKE_BUILD_TYPE STREQUAL Devel)
 	# add defines
-	add_definitions(-O1 -g -W -march=athlon-xp -march=prescott -m32)
+	add_definitions(${CommonFlags} ${OptimizationFlags})
 endif(CMAKE_BUILD_TYPE STREQUAL Devel)
 
 # Release - Build
 if(CMAKE_BUILD_TYPE STREQUAL Release)
 	# add defines
-	add_definitions(-fexpensive-optimizations -O3 -Os -W -march=athlon-xp -march=prescott -m32)
+	add_definitions(${CommonFlags} ${OptimizationFlags})
 endif(CMAKE_BUILD_TYPE STREQUAL Release)
 
 # variable with all sources of this library
@@ -49,7 +59,9 @@
 	cpu_detect.h)
 
 # add library
-add_library(${SoundTouchName} STATIC ${SoundTouchSources} ${SoundTouchHeaders})
+add_library(${Output} STATIC ${SoundTouchSources} ${SoundTouchHeaders})
 
-# Force the linker into 32 bits mode
-target_link_libraries(${SoundTouchName} -m32)
+# User flags options
+if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
+    target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}")
+endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")

 

  ViewVC Help
Powered by ViewVC 1.1.22