LUA lib status, some fixes
This commit is contained in:
@@ -365,10 +365,12 @@ if(PIP_FREERTOS)
|
||||
set(PIP_LIBS ${LIBS_MAIN})
|
||||
else()
|
||||
foreach(LIB_ ${LIBS_MAIN})
|
||||
find_library(${LIB_}_FOUND ${LIB_})
|
||||
if(${LIB_}_FOUND)
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES ${${LIB_}_FOUND})
|
||||
list(APPEND PIP_LIBS ${${LIB_}_FOUND})
|
||||
find_library(${LIB_}_LIBRARIES ${LIB_})
|
||||
set(${LIB_}_FOUND FALSE)
|
||||
if(${LIB_}_LIBRARIES)
|
||||
set(${LIB_}_FOUND TRUE)
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES ${${LIB_}_LIBRARIES})
|
||||
list(APPEND PIP_LIBS ${${LIB_}_LIBRARIES})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
@@ -398,8 +400,10 @@ target_link_libraries(pip ${PIP_LIBS})
|
||||
if (NOT CROSSTOOLS)
|
||||
if (NOT PIP_FREERTOS)
|
||||
# Check if USB is supported
|
||||
find_library(usb_FOUND usb SHARED)
|
||||
if(usb_FOUND)
|
||||
find_library(usb_LIBRARIES usb SHARED)
|
||||
set(usb_FOUND FALSE)
|
||||
if(usb_LIBRARIES)
|
||||
set(usb_FOUND TRUE)
|
||||
set(PIP_USB "yes")
|
||||
import_version(pip_usb pip)
|
||||
set_deploy_property(pip_usb ${PIP_LIB_TYPE}
|
||||
@@ -410,7 +414,7 @@ if (NOT CROSSTOOLS)
|
||||
make_rc(pip_usb _RC)
|
||||
add_definitions(-DPIP_USB)
|
||||
add_library(pip_usb ${PIP_LIB_TYPE} ${CPP_LIB_USB} ${_RC})
|
||||
target_link_libraries(pip_usb pip ${usb_FOUND})
|
||||
target_link_libraries(pip_usb pip ${usb_LIBRARIES})
|
||||
list(APPEND LIBS_STATUS usb)
|
||||
list(APPEND PIP_LIBS_TARGETS pip_usb)
|
||||
endif()
|
||||
@@ -430,8 +434,10 @@ if (NOT CROSSTOOLS)
|
||||
|
||||
|
||||
# Check if PIP support cryptographic encryption/decryption using sodium library
|
||||
find_library(sodium_FOUND sodium)
|
||||
if(sodium_FOUND)
|
||||
find_library(sodium_LIBRARIES sodium)
|
||||
set(sodium_FOUND FALSE)
|
||||
if(sodium_LIBRARIES)
|
||||
set(sodium_FOUND TRUE)
|
||||
set(PIP_CRYPT "yes")
|
||||
set(PIP_IOUTILS "yes (+crypt)")
|
||||
set(PIP_CLOUD "yes")
|
||||
@@ -444,15 +450,17 @@ if (NOT CROSSTOOLS)
|
||||
make_rc(pip_crypt _RC)
|
||||
add_definitions(-DPIP_CRYPT)
|
||||
add_library(pip_crypt ${PIP_LIB_TYPE} ${CPP_LIB_CRYPT} ${_RC})
|
||||
target_link_libraries(pip_crypt pip ${sodium_FOUND})
|
||||
target_link_libraries(pip_crypt pip ${sodium_LIBRARIES})
|
||||
list(APPEND LIBS_STATUS sodium)
|
||||
list(APPEND PIP_LIBS_TARGETS pip_crypt)
|
||||
endif()
|
||||
|
||||
|
||||
# Check if PIP support compress/decompress using zlib library
|
||||
find_library(zlib_FOUND NAMES z zlib)
|
||||
if(zlib_FOUND)
|
||||
find_library(zlib_LIBRARIES NAMES z zlib)
|
||||
set(zlib_FOUND FALSE)
|
||||
if(zlib_LIBRARIES)
|
||||
set(zlib_FOUND TRUE)
|
||||
set(PIP_COMPRESS "yes")
|
||||
import_version(pip_compress pip)
|
||||
set_deploy_property(pip_compress ${PIP_LIB_TYPE}
|
||||
@@ -463,7 +471,7 @@ if (NOT CROSSTOOLS)
|
||||
make_rc(pip_compress _RC)
|
||||
add_definitions(-DPIP_COMPRESS)
|
||||
add_library(pip_compress ${PIP_LIB_TYPE} ${CPP_LIB_COMPRESS} ${_RC})
|
||||
target_link_libraries(pip_compress pip ${zlib_FOUND})
|
||||
target_link_libraries(pip_compress pip ${zlib_LIBRARIES})
|
||||
list(APPEND LIBS_STATUS zlib)
|
||||
list(APPEND PIP_LIBS_TARGETS pip_compress)
|
||||
endif()
|
||||
@@ -475,7 +483,6 @@ if (NOT CROSSTOOLS)
|
||||
set(FFTW_LIB_SUFFIXES2 "" "-3")
|
||||
set(FFTW_LIBS)
|
||||
set(FFTW_ABS_LIBS)
|
||||
set(PIP_FFTW_FOUND)
|
||||
set(CMAKE_REQUIRED_INCLUDES fftw3.h)
|
||||
foreach(FFTW_S_ IN LISTS FFTW_LIB_SUFFIXES)
|
||||
set(FFTW_BREAK false)
|
||||
@@ -483,21 +490,24 @@ if (NOT CROSSTOOLS)
|
||||
if(NOT FFTW_BREAK)
|
||||
set(FFTW_CLN "${FFTW_LIB_NAME}${FFTW_S_}${FFTW_S2_}")
|
||||
set(FFTW_CLNT "${FFTW_LIB_NAME}${FFTW_S_}_threads${FFTW_S2_}")
|
||||
find_library(${FFTW_CLN}_FOUND ${FFTW_CLN})
|
||||
find_library(${FFTW_CLNT}_FOUND ${FFTW_CLNT})
|
||||
if(${FFTW_CLN}_FOUND)
|
||||
find_library(${FFTW_CLN}_LIBRARIES ${FFTW_CLN})
|
||||
find_library(${FFTW_CLNT}_LIBRARIES ${FFTW_CLNT})
|
||||
set(${FFTW_CLN}_FOUND FALSE)
|
||||
set(${FFTW_CLNT}_FOUND FALSE)
|
||||
if(${FFTW_CLN}_LIBRARIES)
|
||||
set(${FFTW_CLN}_FOUND TRUE)
|
||||
list(APPEND FFTW_LIBS "${FFTW_CLN}")
|
||||
list(APPEND FFTW_ABS_LIBS "${${FFTW_CLN}_FOUND}")
|
||||
list(APPEND FFTW_ABS_LIBS "${${FFTW_CLN}_LIBRARIES}")
|
||||
set(${FFTW_CLN}_CTS "${FFTW_CLN}")
|
||||
if(${FFTW_CLNT}_FOUND)
|
||||
if(${FFTW_CLNT}_FLIBRARIES)
|
||||
set(${FFTW_CLNT}_FOUND TRUE)
|
||||
list(APPEND FFTW_LIBS "${FFTW_CLNT}")
|
||||
list(APPEND FFTW_ABS_LIBS "${${FFTW_CLNT}_FOUND}")
|
||||
list(APPEND FFTW_ABS_LIBS "${${FFTW_CLNT}_LIBRARIES}")
|
||||
list(APPEND ${FFTW_CLN}_CTS "${FFTW_CLNT}")
|
||||
endif()
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${${FFTW_CLN}_CTS})
|
||||
CHECK_FUNCTION_EXISTS(fftw${FFTW_S_}_make_planner_thread_safe ${FFTW_CLN}_TSFE)
|
||||
add_definitions(-DPIP_FFTW${FFTW_S_})
|
||||
set(PIP_FFTW_FOUND true)
|
||||
if(${FFTW_CLN}_TSFE)
|
||||
add_definitions(-DPIP_FFTW${FFTW_S_}_THREADSAFE)
|
||||
else()
|
||||
@@ -550,7 +560,6 @@ if (NOT CROSSTOOLS)
|
||||
endif()
|
||||
list(APPEND LIBS_STATUS OpenCL)
|
||||
list(APPEND PIP_LIBS_TARGETS pip_opencl)
|
||||
set(OpenCL_FOUND ${OpenCL_LIBRARIES})
|
||||
endif()
|
||||
|
||||
|
||||
@@ -628,6 +637,7 @@ if (NOT CROSSTOOLS)
|
||||
list(APPEND HDR_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/lib/lua/3rd/LuaBridge")
|
||||
add_library(pip_lua ${PIP_LIB_TYPE} ${CPP_LIB_LUA} ${_RC})
|
||||
target_link_libraries(pip_lua pip ${LUA_LIBRARIES})
|
||||
list(APPEND LIBS_STATUS LUA)
|
||||
list(APPEND PIP_LIBS_TARGETS pip_lua)
|
||||
endif()
|
||||
|
||||
@@ -815,8 +825,9 @@ if(NOT PIP_FREERTOS)
|
||||
message("")
|
||||
message(" Using libraries:")
|
||||
foreach(LIB_ ${LIBS_STATUS})
|
||||
message(" ${LIB_} -> " ${${LIB_}_FOUND})
|
||||
if(NOT ${LIB_}_FOUND)
|
||||
if(${LIB_}_FOUND)
|
||||
message(" ${LIB_} -> ${${LIB_}_LIBRARIES}")
|
||||
else()
|
||||
message(" ${LIB_} not found, may fail")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
Reference in New Issue
Block a user