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

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

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

--- trunk/3rdparty/zlib/CMakeLists.txt	2010/09/07 06:28:05	61
+++ trunk/3rdparty/zlib/CMakeLists.txt	2010/09/07 11:08:22	62
@@ -1,61 +1,70 @@
 # zlib library
 
 # library name
-set(zlibName zlib)
+set(Output pcsx2_zlib)
+
+set(CommonFlags
+    -W
+    )
+
+set(OptimizationFlags
+    -Os
+    )
 
 # Debug - Build
 if(CMAKE_BUILD_TYPE STREQUAL Debug)
 	# add defines
-	add_definitions(-W -g -O0)
+	add_definitions(${CommonFlags} -g)
 endif(CMAKE_BUILD_TYPE STREQUAL Debug)
 
 # Devel - Build
 if(CMAKE_BUILD_TYPE STREQUAL Devel)
 	# add defines
-	add_definitions(-O2 -W)
+	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 -W)
+	add_definitions(${CommonFlags} ${OptimizationFlags})
 endif(CMAKE_BUILD_TYPE STREQUAL Release)
 
 # variable with all sources of this library
 set(zlibSources
-compress.c  
-deflate.c  
-gzwrite.c  
-trees.c    
+compress.c
+deflate.c
+gzwrite.c
+trees.c
 crc32.c
 gzlib.c
-infback.c  
-inftrees.c  
-adler32.c    
-gzclose.c  
-gzread.c  
-inffast.c  
-inflate.c   
-uncompr.c 
+infback.c
+inftrees.c
+adler32.c
+gzclose.c
+gzread.c
+inffast.c
+inflate.c
+uncompr.c
 zutil.c)
 
 # variable with all headers of this library
 set(zlibHeaders
-gzguts.h  
-inffast.h   
-inflate.h   
-zconf.h      
+gzguts.h
+inffast.h
+inflate.h
+zconf.h
 zlib.h
 zutil.h
-deflate.h 
-inffixed.h  
+deflate.h
+inffixed.h
 trees.h
-crc32.h     
+crc32.h
 inftrees.h )
 
 # add library
-add_library(${zlibName} STATIC ${zlibSources} ${zlibHeaders})
-
-# Force the linker into 32 bits mode
-target_link_libraries(${zlibName} -m32)
+add_library(${Output} STATIC ${zlibSources} ${zlibHeaders})
 
+# 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