Commit b5d8fe09 authored by Jérome Perrin's avatar Jérome Perrin

CMakeLists fixes for slapos integration

parent f7e85c34
......@@ -384,14 +384,14 @@ if(LIB_BOOST_ROOT_DIR)
message(FATAL_ERROR "Boost is not found, add boost with -DLIB_BOOST_ROOT_DIR=[path to BOOST]!")
endif(Boost_FOUND)
else(WIN32)
find_library(BOOST_LIBS NAMES boost_thread-mt boost_system-mt boost_regex-mt PATHS ${LIB_BOOST_ROOT_DIR}/lib/${CMAKE_SYSTEM_NAME}/${ARCH_HINT})
find_library(BOOST_LIBS NAMES boost_thread-mt boost_system-mt boost_regex-mt PATHS ${LIB_BOOST_ROOT_DIR}/lib)
if(BOOST_LIBS)
add_library(libboost_thread-mt SHARED IMPORTED)
add_library(libboost_system-mt SHARED IMPORTED)
add_library(libboost_regex-mt SHARED IMPORTED)
set_property(TARGET libboost_thread-mt PROPERTY IMPORTED_LOCATION ${LIB_BOOST_ROOT_DIR}/lib/${CMAKE_SYSTEM_NAME}/${ARCH_HINT}/libboost_thread-mt.so)
set_property(TARGET libboost_system-mt PROPERTY IMPORTED_LOCATION ${LIB_BOOST_ROOT_DIR}/lib/${CMAKE_SYSTEM_NAME}/${ARCH_HINT}/libboost_system-mt.so)
set_property(TARGET libboost_regex-mt PROPERTY IMPORTED_LOCATION ${LIB_BOOST_ROOT_DIR}/lib/${CMAKE_SYSTEM_NAME}/${ARCH_HINT}/libboost_regex-mt.so)
set_property(TARGET libboost_thread-mt PROPERTY IMPORTED_LOCATION ${LIB_BOOST_ROOT_DIR}/lib/libboost_thread-mt.so)
set_property(TARGET libboost_system-mt PROPERTY IMPORTED_LOCATION ${LIB_BOOST_ROOT_DIR}/lib/libboost_system-mt.so)
set_property(TARGET libboost_regex-mt PROPERTY IMPORTED_LOCATION ${LIB_BOOST_ROOT_DIR}/lib/libboost_regex-mt.so)
set(LIBS ${LIBS} libboost_thread-mt libboost_system-mt libboost_regex-mt)
set(INCLUDES ${INCLUDES} ${LIB_BOOST_ROOT_DIR}/include)
# set some config variables
......@@ -436,12 +436,12 @@ if(LIB_OPENSSL_ROOT_DIR)
set(LIBS ${LIBS} libeay32.lib)
link_directories(${LIB_OPENSSL_ROOT_DIR}/lib/${CMAKE_SYSTEM_NAME}/${ARCH_HINT}/static)
else(WIN32)
find_library(SSL_LIBRARY NAMES ssl crypto PATHS ${LIB_OPENSSL_ROOT_DIR}/lib/${CMAKE_SYSTEM_NAME}/${ARCH_HINT})
find_library(SSL_LIBRARY NAMES ssl crypto PATHS ${LIB_OPENSSL_ROOT_DIR}/lib)
if(SSL_LIBRARY)
add_library(libssl SHARED IMPORTED)
add_library(libcrypto SHARED IMPORTED)
set_property(TARGET libssl PROPERTY IMPORTED_LOCATION ${LIB_OPENSSL_ROOT_DIR}/lib/${CMAKE_SYSTEM_NAME}/${ARCH_HINT}/libssl.so)
set_property(TARGET libcrypto PROPERTY IMPORTED_LOCATION ${LIB_OPENSSL_ROOT_DIR}/lib/${CMAKE_SYSTEM_NAME}/${ARCH_HINT}/libcrypto.so)
set_property(TARGET libssl PROPERTY IMPORTED_LOCATION ${LIB_OPENSSL_ROOT_DIR}/lib/libssl.so)
set_property(TARGET libcrypto PROPERTY IMPORTED_LOCATION ${LIB_OPENSSL_ROOT_DIR}/lib/libcrypto.so)
# set some config variables
set(HAVE_OPENSSL_SSL_H TRUE)
set(HAVE_SSL_LIB TRUE)
......@@ -482,11 +482,11 @@ if(LIB_PERFTOOLS_ROOT)
endif(LIB_PERFTOOLS_ROOT)
if(LIB_PERFTOOLS_ROOT_DIR)
find_library(TCMALLOC NAMES tcmalloc_minimal PATHS ${LIB_PERFTOOLS_ROOT_DIR}/lib/${CMAKE_SYSTEM_NAME}/${ARCH_HINT})
find_library(TCMALLOC NAMES tcmalloc_minimal PATHS ${LIB_PERFTOOLS_ROOT_DIR}/lib)
if(TCMALLOC)
# add tcmalloc_minimal
add_library(libtcmalloc_minimal SHARED IMPORTED)
set_property(TARGET libtcmalloc_minimal PROPERTY IMPORTED_LOCATION ${LIB_PERFTOOLS_ROOT_DIR}/lib/${CMAKE_SYSTEM_NAME}/${ARCH_HINT}/libtcmalloc_minimal.so)
set_property(TARGET libtcmalloc_minimal PROPERTY IMPORTED_LOCATION ${LIB_PERFTOOLS_ROOT_DIR}/lib/libtcmalloc_minimal.so)
set(LIBS ${LIBS} libtcmalloc_minimal)
else(TCMALLOC)
message(FATAL_ERROR "tcmalloc_minimal not available, add it with -DLIB_PERFTOOLS_ROOT_DIR =[path to perftools]")
......@@ -612,8 +612,8 @@ if(LIB_ICU_ROOT_DIR)
if(ICU)
add_library(libicuuc SHARED IMPORTED)
add_library(libicui18n SHARED IMPORTED)
set_property(TARGET libicuuc PROPERTY IMPORTED_LOCATION ${LIB_ICU_ROOT_DIR}/lib/${CMAKE_SYSTEM_NAME}/${ARCH_HINT}/libicuuc.so)
set_property(TARGET libicui18n PROPERTY IMPORTED_LOCATION ${LIB_ICU_ROOT_DIR}/lib/${CMAKE_SYSTEM_NAME}/${ARCH_HINT}/libicui18n.so)
set_property(TARGET libicuuc PROPERTY IMPORTED_LOCATION ${LIB_ICU_ROOT_DIR}/lib/libicuuc.so)
set_property(TARGET libicui18n PROPERTY IMPORTED_LOCATION ${LIB_ICU_ROOT_DIR}/lib/libicui18n.so)
set(INCLUDES ${INCLUDES} ${LIB_ICU_ROOT_DIR}/include)
set(LIBS ${LIBS} libicuuc libicui18n)
else(ICU)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment