diff --git a/CMakeLists.txt b/CMakeLists.txt index 202767c92..1136c0655 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,6 +122,19 @@ if(NOT WIN32) endif() endif() + +option(FORCE_LOKIMQ_SUBMODULE "force using lokimq submodule" OFF) +if(NOT FORCE_LOKIMQ_SUBMODULE) + find_package(LokiMQ 1.2) +endif() +if(LokiMQ_FOUND) + message(STATUS "using system lokimq") +else() + message(STATUS "using lokimq submodule") + add_subdirectory(${CMAKE_SOURCE_DIR}/external/loki-mq EXCLUDE_FROM_ALL) +endif() + + # this is messing with release builds add_compile_options(-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0) diff --git a/cmake/unix.cmake b/cmake/unix.cmake index 1c8d19022..7b2ae71a4 100644 --- a/cmake/unix.cmake +++ b/cmake/unix.cmake @@ -64,17 +64,6 @@ elseif(DOWNLOAD_UV) endif() include_directories(${LIBUV_INCLUDE_DIRS}) -option(FORCE_LOKIMQ_SUBMODULE "force using lokimq submodule" OFF) -if(NOT FORCE_LOKIMQ_SUBMODULE) - find_package(LokiMQ 1.2) -endif() -if(LokiMQ_FOUND) - message(STATUS "using system lokimq") -else() - message(STATUS "using lokimq submodule") - add_subdirectory(${CMAKE_SOURCE_DIR}/external/loki-mq EXCLUDE_FROM_ALL) -endif() - if(EMBEDDED_CFG OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux") link_libatomic() endif()