2021-09-28 08:12:39 +08:00
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
2021-10-12 09:21:08 +08:00
|
|
|
set(lib_path_suffix lib)
|
|
|
|
else()
|
|
|
|
set(lib_path_suffix debug/lib)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if("bzip2" IN_LIST FEATURES)
|
|
|
|
list(APPEND B2_OPTIONS
|
|
|
|
-sBZIP2_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
|
|
|
|
)
|
|
|
|
# Overwride debug library name
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
|
|
list(APPEND B2_OPTIONS
|
|
|
|
-sBZIP2_NAME=bz2d
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
list(APPEND B2_OPTIONS
|
|
|
|
-sBZIP2_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_path_suffix}"
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
list(APPEND B2_OPTIONS
|
|
|
|
-sNO_BZIP2=1
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if("lzma" IN_LIST FEATURES)
|
|
|
|
list(APPEND B2_OPTIONS
|
|
|
|
-sLZMA_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
|
|
|
|
)
|
|
|
|
list(APPEND B2_OPTIONS
|
|
|
|
-sLZMA_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_path_suffix}"
|
|
|
|
)
|
2021-09-28 08:12:39 +08:00
|
|
|
else()
|
2021-10-12 09:21:08 +08:00
|
|
|
list(APPEND B2_OPTIONS
|
|
|
|
-sNO_LZMA=1
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if("zlib" IN_LIST FEATURES)
|
|
|
|
list(APPEND B2_OPTIONS
|
|
|
|
-sZLIB_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
|
|
|
|
)
|
2023-10-20 00:29:18 +08:00
|
|
|
# Overwride windows library names
|
|
|
|
if(WIN32)
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
2021-10-12 09:21:08 +08:00
|
|
|
set(ZLIB_NAME zlibd)
|
|
|
|
else()
|
2023-10-20 00:29:18 +08:00
|
|
|
set(ZLIB_NAME zlib) # for mingw
|
2021-10-12 09:21:08 +08:00
|
|
|
endif()
|
|
|
|
list(APPEND B2_OPTIONS
|
|
|
|
-sZLIB_NAME=${ZLIB_NAME}
|
|
|
|
)
|
2021-09-28 08:12:39 +08:00
|
|
|
endif()
|
|
|
|
list(APPEND B2_OPTIONS
|
2021-10-12 09:21:08 +08:00
|
|
|
-sZLIB_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_path_suffix}"
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
list(APPEND B2_OPTIONS
|
|
|
|
-sNO_ZLIB=1
|
2021-09-28 08:12:39 +08:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2021-10-12 09:21:08 +08:00
|
|
|
if("zstd" IN_LIST FEATURES)
|
|
|
|
list(APPEND B2_OPTIONS
|
|
|
|
-sZSTD_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
|
|
|
|
)
|
|
|
|
list(APPEND B2_OPTIONS
|
|
|
|
-sZSTD_LIBRARY_PATH="${CURRENT_INSTALLED_DIR}/${lib_path_suffix}"
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
list(APPEND B2_OPTIONS
|
|
|
|
-sNO_ZSTD=1
|
|
|
|
)
|
|
|
|
endif()
|