Maurice Grönwoldt
5bb68a7d02
We have no make install support... so we don't need to have everything as a single-header and lib file.
23 lines
576 B
CMake
23 lines
576 B
CMake
cmake_minimum_required(VERSION 3.17)
|
|
project(VWeb_Example)
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
|
find_package(Threads REQUIRED)
|
|
find_package(VWeb 1.0 REQUIRED)
|
|
add_executable(VWeb_Example main.cpp)
|
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/..)
|
|
|
|
set(mode Release)
|
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
set(mode Debug)
|
|
endif ()
|
|
set(vweb_lib ${CMAKE_SOURCE_DIR}/../dist/libVWeb.${mode}.a)
|
|
|
|
SET_SOURCE_FILES_PROPERTIES(
|
|
main.cpp
|
|
PROPERTIES OBJECT_DEPENDS ${vweb_lib}
|
|
)
|
|
|
|
target_link_libraries(VWeb_Example Threads::Threads ${vweb_lib})
|