Files
spark/cmake_modules/websocket-libraryConfig.cmake
T
John Colvin c30e23406c fix build: Trivial changes to fix emumba_deribit build
* Use "Unix Makefiles" generator when building websocket-library.
  - Ninja tries to build things in parallel, and doesn't build the
    ExternalProject dependencies in the right order. Consequently, the
    websocket-library build fails because it can't find "libspdlog.a".

* Replace a few leftover SPDLOG_ERROR macros w/ LOG_ERROR (the latter
  logs in our system, not spdlog).
2025-01-10 20:01:44 +00:00

26 lines
1.1 KiB
CMake

include(ExternalProject)
if(NOT TARGET websocket-library_project)
ExternalProject_Add(websocket-library_project
GIT_REPOSITORY https://fintech.websocket:h_ubh-4dsWRB569wwKyg@gitlab.com/cryptoexchanges1/websocket-client-using-epoll.git
GIT_TAG enhancement/config-ssl
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/websocket-library
-DCMAKE_BUILD_TYPE=Release
-DLOG_LEVEL=INFO
-DENABLE_ENCRYPTION=True
)
endif()
ExternalProject_Get_Property(websocket-library_project BINARY_DIR)
ExternalProject_Get_Property(websocket-library_project SOURCE_DIR)
set(websocket-library_INCLUDE_DIR ${SOURCE_DIR}/include)
set(websocket-library_LIB_DIR ${BINARY_DIR}/src)
add_library(websocket-library STATIC IMPORTED)
set_property(TARGET websocket-library PROPERTY IMPORTED_LOCATION ${websocket-library_LIB_DIR}/libemumba-websocket-library.a)
add_dependencies(websocket-library websocket-library_project)
install(FILES ${websocket-library_LIB_DIR}/libemumba-websocket-library.a DESTINATION ${CMAKE_INSTALL_LIBDIR})