2010-01-21 15:12:50 +00:00
|
|
|
# bzip2 library
|
|
|
|
|
|
|
|
# library name
|
2010-07-25 13:54:26 +00:00
|
|
|
set(Output pcsx2_bzip2)
|
2010-01-21 15:12:50 +00:00
|
|
|
|
2010-06-04 11:07:25 +00:00
|
|
|
set(CommonFlags
|
|
|
|
-march=athlon-xp
|
|
|
|
-march=prescott
|
|
|
|
)
|
|
|
|
|
2010-06-04 17:31:55 +00:00
|
|
|
set(OptimizationFlags
|
|
|
|
-Os
|
|
|
|
-W
|
|
|
|
)
|
|
|
|
|
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} -g)
|
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(bzip2Sources
|
|
|
|
blocksort.c
|
|
|
|
bzlib.c
|
|
|
|
compress.c
|
|
|
|
crctable.c
|
|
|
|
decompress.c
|
|
|
|
huffman.c
|
|
|
|
randtable.c)
|
|
|
|
|
|
|
|
# variable with all headers of this library
|
|
|
|
set(bzip2Headers
|
|
|
|
bzlib.h
|
|
|
|
bzlib_private.h)
|
|
|
|
|
|
|
|
# add library
|
2010-07-25 13:54:26 +00:00
|
|
|
add_library(${Output} STATIC ${bzip2Sources} ${bzip2Headers})
|
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 "")
|