2010-01-21 15:12:50 +00:00
|
|
|
# zlib library
|
|
|
|
|
|
|
|
# library name
|
|
|
|
set(zlibName zlib)
|
|
|
|
|
2010-01-22 04:36:49 +00:00
|
|
|
# Debug - Build
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
|
|
# add defines
|
|
|
|
add_definitions(-W -g -O0)
|
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
|
|
|
|
|
|
# Devel - Build
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
|
|
# add defines
|
|
|
|
add_definitions(-O2 -W)
|
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
|
|
|
|
|
|
# Release - Build
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
|
|
# add defines
|
|
|
|
add_definitions(-fexpensive-optimizations -O3 -W)
|
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
|
|
|
2010-01-21 15:12:50 +00:00
|
|
|
# variable with all sources of this library
|
|
|
|
set(zlibSources
|
2010-05-04 20:28:34 +00:00
|
|
|
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
|
|
|
|
zutil.c)
|
2010-01-21 15:12:50 +00:00
|
|
|
|
|
|
|
# variable with all headers of this library
|
|
|
|
set(zlibHeaders
|
2010-05-04 20:28:34 +00:00
|
|
|
gzguts.h
|
|
|
|
inffast.h
|
|
|
|
inflate.h
|
|
|
|
zconf.h
|
|
|
|
zlib.h
|
|
|
|
zutil.h
|
|
|
|
deflate.h
|
|
|
|
inffixed.h
|
|
|
|
trees.h
|
|
|
|
crc32.h
|
|
|
|
inftrees.h )
|
2010-01-21 15:12:50 +00:00
|
|
|
|
|
|
|
# add library
|
|
|
|
add_library(${zlibName} STATIC ${zlibSources} ${zlibHeaders})
|
|
|
|
|
2010-05-16 00:36:42 +00:00
|
|
|
# Force the linker into 32 bits mode
|
|
|
|
target_link_libraries(${zlibName} -m32)
|
|
|
|
|