cmake_minimum_required(VERSION 3.17) project(VWeb_Example) set(CMAKE_CXX_STANDARD 20) set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads 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})