/[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

revision 61 by william, Tue Sep 7 03:24:11 2010 UTC revision 62 by william, Tue Sep 7 11:08:22 2010 UTC
# Line 1  Line 1 
1  # zlib library  # zlib library
2    
3  # library name  # library name
4  set(zlibName zlib)  set(Output pcsx2_zlib)
5    
6    set(CommonFlags
7        -W
8        )
9    
10    set(OptimizationFlags
11        -Os
12        )
13    
14  # Debug - Build  # Debug - Build
15  if(CMAKE_BUILD_TYPE STREQUAL Debug)  if(CMAKE_BUILD_TYPE STREQUAL Debug)
16          # add defines          # add defines
17          add_definitions(-W -g -O0)          add_definitions(${CommonFlags} -g)
18  endif(CMAKE_BUILD_TYPE STREQUAL Debug)  endif(CMAKE_BUILD_TYPE STREQUAL Debug)
19    
20  # Devel - Build  # Devel - Build
21  if(CMAKE_BUILD_TYPE STREQUAL Devel)  if(CMAKE_BUILD_TYPE STREQUAL Devel)
22          # add defines          # add defines
23          add_definitions(-O2 -W)          add_definitions(${CommonFlags} ${OptimizationFlags})
24  endif(CMAKE_BUILD_TYPE STREQUAL Devel)  endif(CMAKE_BUILD_TYPE STREQUAL Devel)
25    
26  # Release - Build  # Release - Build
27  if(CMAKE_BUILD_TYPE STREQUAL Release)  if(CMAKE_BUILD_TYPE STREQUAL Release)
28          # add defines          # add defines
29          add_definitions(-fexpensive-optimizations -O3 -W)          add_definitions(${CommonFlags} ${OptimizationFlags})
30  endif(CMAKE_BUILD_TYPE STREQUAL Release)  endif(CMAKE_BUILD_TYPE STREQUAL Release)
31    
32  # variable with all sources of this library  # variable with all sources of this library
33  set(zlibSources  set(zlibSources
34  compress.c    compress.c
35  deflate.c    deflate.c
36  gzwrite.c    gzwrite.c
37  trees.c      trees.c
38  crc32.c  crc32.c
39  gzlib.c  gzlib.c
40  infback.c    infback.c
41  inftrees.c    inftrees.c
42  adler32.c      adler32.c
43  gzclose.c    gzclose.c
44  gzread.c    gzread.c
45  inffast.c    inffast.c
46  inflate.c    inflate.c
47  uncompr.c  uncompr.c
48  zutil.c)  zutil.c)
49    
50  # variable with all headers of this library  # variable with all headers of this library
51  set(zlibHeaders  set(zlibHeaders
52  gzguts.h    gzguts.h
53  inffast.h    inffast.h
54  inflate.h    inflate.h
55  zconf.h        zconf.h
56  zlib.h  zlib.h
57  zutil.h  zutil.h
58  deflate.h  deflate.h
59  inffixed.h    inffixed.h
60  trees.h  trees.h
61  crc32.h      crc32.h
62  inftrees.h )  inftrees.h )
63    
64  # add library  # add library
65  add_library(${zlibName} STATIC ${zlibSources} ${zlibHeaders})  add_library(${Output} STATIC ${zlibSources} ${zlibHeaders})
   
 # Force the linker into 32 bits mode  
 target_link_libraries(${zlibName} -m32)  
66    
67    # User flags options
68    if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
69        target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}")
70    endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")

Legend:
Removed from v.61  
changed lines
  Added in v.62

  ViewVC Help
Powered by ViewVC 1.1.22