mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Add boost as a submodule
This can be used in builds by specifying the USE_SUBMODULE_BOOST option
This commit is contained in:
parent
a0efb81852
commit
722e7e133e
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -41,3 +41,6 @@
|
|||
[submodule "tools/crash-handler"]
|
||||
path = tools/crash-handler
|
||||
url = https://github.com/Chatterino/crash-handler
|
||||
[submodule "lib/boost"]
|
||||
path = lib/boost
|
||||
url = https://github.com/boostorg/boost
|
||||
|
|
|
@ -14,6 +14,7 @@ option(BUILD_BENCHMARKS "Build the benchmarks for Chatterino" OFF)
|
|||
option(USE_SYSTEM_PAJLADA_SETTINGS "Use system pajlada settings library" OFF)
|
||||
option(USE_SYSTEM_LIBCOMMUNI "Use system communi library" OFF)
|
||||
option(USE_SYSTEM_QTKEYCHAIN "Use system QtKeychain library" OFF)
|
||||
option(USE_SUBMODULE_BOOST "Use boost from submodules" OFF)
|
||||
option(BUILD_WITH_QTKEYCHAIN "Build Chatterino with support for your system key chain" ON)
|
||||
option(USE_SYSTEM_MINIAUDIO "Build Chatterino with your system miniaudio" OFF)
|
||||
option(BUILD_WITH_CRASHPAD "Build chatterino with crashpad" OFF)
|
||||
|
@ -122,8 +123,11 @@ endif ()
|
|||
|
||||
find_package(Sanitizers QUIET)
|
||||
|
||||
# Find boost on the system
|
||||
find_package(Boost REQUIRED OPTIONAL_COMPONENTS headers)
|
||||
if (USE_SUBMODULE_BOOST)
|
||||
add_subdirectory(lib/boost EXCLUDE_FROM_ALL)
|
||||
else ()
|
||||
find_package(Boost REQUIRED OPTIONAL_COMPONENTS headers)
|
||||
endif ()
|
||||
|
||||
# Find OpenSSL on the system
|
||||
find_package(OpenSSL REQUIRED)
|
||||
|
|
1
lib/boost
Submodule
1
lib/boost
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 8fa3090c97542b7e0a837fc8b580268b9d76e585
|
|
@ -1002,10 +1002,20 @@ if (WIN32)
|
|||
WinToast)
|
||||
endif ()
|
||||
|
||||
target_link_libraries(${LIBRARY_PROJECT}
|
||||
PUBLIC
|
||||
${Boost_LIBRARIES}
|
||||
)
|
||||
if (USE_SUBMODULE_BOOST)
|
||||
target_link_libraries(${LIBRARY_PROJECT}
|
||||
PUBLIC
|
||||
Boost::asio
|
||||
Boost::circular_buffer
|
||||
Boost::signals2
|
||||
Boost::interprocess
|
||||
)
|
||||
else ()
|
||||
target_link_libraries(${LIBRARY_PROJECT}
|
||||
PUBLIC
|
||||
${Boost_LIBRARIES}
|
||||
)
|
||||
endif ()
|
||||
|
||||
target_link_libraries(${LIBRARY_PROJECT}
|
||||
PUBLIC
|
||||
|
|
Loading…
Reference in a new issue