git-svn-id: svn://db.shs.com.ru/pip@554 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -30,6 +30,7 @@ endmacro()
|
||||
|
||||
set(PIP_SRC_MAIN "src_main")
|
||||
set(PIP_SRC_CRYPT "src_crypt")
|
||||
set(PIP_SRC_COMPRESS "src_compress")
|
||||
set(PIP_SRC_USB "src_usb")
|
||||
set(PIP_SRC_FFTW "src_fftw")
|
||||
set(PIP_LIBS_TARGETS pip)
|
||||
@@ -94,6 +95,9 @@ endforeach(F)
|
||||
# Crypt lib
|
||||
gather_src("${PIP_SRC_CRYPT}" CPP_LIB_CRYPT HDRS PHDRS)
|
||||
|
||||
# Compress lib
|
||||
gather_src("${PIP_SRC_COMPRESS}" CPP_LIB_COMPRESS HDRS PHDRS)
|
||||
|
||||
# USB lib
|
||||
gather_src("${PIP_SRC_USB}" CPP_LIB_USB HDRS PHDRS)
|
||||
|
||||
@@ -291,6 +295,20 @@ else()
|
||||
endif()
|
||||
|
||||
|
||||
# Check if PIP support compress/decompress using zlib library
|
||||
find_library(zlib_FOUND NAMES zlib z)
|
||||
if(zlib_FOUND)
|
||||
message(STATUS "Building with zlib compress support")
|
||||
add_definitions(-DPIP_COMPRESS)
|
||||
add_library(pip_compress SHARED ${CPP_LIB_COMPRESS})
|
||||
target_link_libraries(pip_compress pip ${zlib_FOUND})
|
||||
list(APPEND LIBS_STATUS zlib)
|
||||
list(APPEND PIP_LIBS_TARGETS pip_compress)
|
||||
else()
|
||||
message(STATUS "Building without compress support")
|
||||
endif()
|
||||
|
||||
|
||||
# Check if PIP support fftw3 for PIFFT using in math module
|
||||
set(FFTW_LIB_NAME fftw3)
|
||||
set(FFTW_LIB_SUFFIXES "" "f" "l" "q")
|
||||
@@ -341,7 +359,7 @@ endif()
|
||||
|
||||
# Test program
|
||||
add_executable(pip_test "main.cpp")
|
||||
target_link_libraries(pip_test pip)
|
||||
target_link_libraries(pip_test pip pip_compress)
|
||||
|
||||
|
||||
# Install
|
||||
|
||||
Reference in New Issue
Block a user