mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Add option to use system libcommuni (off by default, "old" behaviour)
This commit is contained in:
parent
98e108710a
commit
4c633a570f
|
@ -10,6 +10,7 @@ option(BUILD_APP "Build Chatterino2" ON)
|
||||||
option(BUILD_TESTS "Build the tests for Chatterino2" OFF)
|
option(BUILD_TESTS "Build the tests for Chatterino2" OFF)
|
||||||
option(USE_PACKAGE_MANAGER "Use conan for managing packages" OFF)
|
option(USE_PACKAGE_MANAGER "Use conan for managing packages" OFF)
|
||||||
option(USE_SYSTEM_PAJLADA_SETTINGS "Use system pajlada settings library" OFF)
|
option(USE_SYSTEM_PAJLADA_SETTINGS "Use system pajlada settings library" OFF)
|
||||||
|
option(USE_SYSTEM_LIBCOMMUNI "Use system communi library" OFF)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
|
@ -102,7 +103,16 @@ else (USE_PACKAGE_MANAGER)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (BUILD_APP)
|
if (BUILD_APP)
|
||||||
|
if (USE_SYSTEM_LIBCOMMUNI)
|
||||||
find_package(LibCommuni REQUIRED)
|
find_package(LibCommuni REQUIRED)
|
||||||
|
else()
|
||||||
|
set(LIBCOMMUNI_ROOT_LIB_FOLDER "${CMAKE_SOURCE_DIR}/lib/libcommuni-cmake")
|
||||||
|
if (NOT EXISTS "${LIBCOMMUNI_ROOT_LIB_FOLDER}/CMakeLists.txt")
|
||||||
|
message(FATAL_ERROR "Submodules probably not loaded, unable to find lib/libcommuni/CMakeLists.txt")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory("${LIBCOMMUNI_ROOT_LIB_FOLDER}" EXCLUDE_FROM_ALL)
|
||||||
|
endif()
|
||||||
find_package(Qt5keychain REQUIRED)
|
find_package(Qt5keychain REQUIRED)
|
||||||
find_package(Rapidjson REQUIRED)
|
find_package(Rapidjson REQUIRED)
|
||||||
find_package(Websocketpp REQUIRED)
|
find_package(Websocketpp REQUIRED)
|
||||||
|
|
Loading…
Reference in a new issue