2010-01-21 15:12:50 +00:00
|
|
|
# zlib library
|
|
|
|
|
|
|
|
# library name
|
2010-07-25 13:54:26 +00:00
|
|
|
set(Output pcsx2_zlib)
|
2010-01-21 15:12:50 +00:00
|
|
|
|
2010-06-04 11:07:25 +00:00
|
|
|
set(CommonFlags
|
|
|
|
-W
|
|
|
|
)
|
|
|
|
|
2010-06-04 17:31:55 +00:00
|
|
|
set(OptimizationFlags
|
|
|
|
-Os
|
|
|
|
)
|
|
|
|
|
2010-01-22 04:36:49 +00:00
|
|
|
# Debug - Build
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
|
|
# add defines
|
2010-06-04 17:31:55 +00:00
|
|
|
add_definitions(${CommonFlags} -g)
|
2010-01-22 04:36:49 +00:00
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
|
|
|
|
|
|
# Devel - Build
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
|
|
# add defines
|
2010-06-04 17:31:55 +00:00
|
|
|
add_definitions(${CommonFlags} ${OptimizationFlags})
|
2010-01-22 04:36:49 +00:00
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
|
|
|
|
|
|
# Release - Build
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
|
|
# add defines
|
2010-06-04 17:31:55 +00:00
|
|
|
add_definitions(${CommonFlags} ${OptimizationFlags})
|
2010-01-22 04:36:49 +00:00
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
|
|
|
2010-01-21 15:12:50 +00:00
|
|
|
# variable with all sources of this library
|
|
|
|
set(zlibSources
|
2010-06-04 11:07:25 +00:00
|
|
|
compress.c
|
|
|
|
deflate.c
|
|
|
|
gzwrite.c
|
|
|
|
trees.c
|
2010-05-04 20:28:34 +00:00
|
|
|
crc32.c
|
|
|
|
gzlib.c
|
2010-06-04 11:07:25 +00:00
|
|
|
infback.c
|
|
|
|
inftrees.c
|
|
|
|
adler32.c
|
|
|
|
gzclose.c
|
|
|
|
gzread.c
|
|
|
|
inffast.c
|
|
|
|
inflate.c
|
|
|
|
uncompr.c
|
2010-05-04 20:28:34 +00:00
|
|
|
zutil.c)
|
2010-01-21 15:12:50 +00:00
|
|
|
|
|
|
|
# variable with all headers of this library
|
|
|
|
set(zlibHeaders
|
2010-06-04 11:07:25 +00:00
|
|
|
gzguts.h
|
|
|
|
inffast.h
|
|
|
|
inflate.h
|
|
|
|
zconf.h
|
2010-05-04 20:28:34 +00:00
|
|
|
zlib.h
|
|
|
|
zutil.h
|
2010-06-04 11:07:25 +00:00
|
|
|
deflate.h
|
|
|
|
inffixed.h
|
2010-05-04 20:28:34 +00:00
|
|
|
trees.h
|
2010-06-04 11:07:25 +00:00
|
|
|
crc32.h
|
2010-05-04 20:28:34 +00:00
|
|
|
inftrees.h )
|
2010-01-21 15:12:50 +00:00
|
|
|
|
|
|
|
# add library
|
2010-07-25 13:54:26 +00:00
|
|
|
add_library(${Output} STATIC ${zlibSources} ${zlibHeaders})
|
2010-07-25 14:20:03 +00:00
|
|
|
|
|
|
|
# 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 "")
|