Initial commit
This commit is contained in:
35
CMakeLists.txt
Normal file
35
CMakeLists.txt
Normal file
@@ -0,0 +1,35 @@
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
project(noolite-srv LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
add_executable(noolite-srv
|
||||
main.cpp
|
||||
)
|
||||
|
||||
include(FetchContent)
|
||||
# cpp-httplib
|
||||
FetchContent_Declare(
|
||||
httplib
|
||||
GIT_REPOSITORY https://gogs.dended.keenetic.pro/ded/cpp-httplib.git
|
||||
GIT_TAG master
|
||||
)
|
||||
FetchContent_MakeAvailable(httplib)
|
||||
|
||||
# noolite
|
||||
FetchContent_Declare(
|
||||
noolite
|
||||
GIT_REPOSITORY https://gogs.dended.keenetic.pro/ded/noolitelib.git
|
||||
GIT_TAG master
|
||||
)
|
||||
FetchContent_MakeAvailable(noolite)
|
||||
|
||||
target_link_libraries(noolite-srv httplib noolite)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
install(TARGETS noolite-srv
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
Reference in New Issue
Block a user