SFTK/CMakeLists.txt

25 lines
719 B
CMake

cmake_minimum_required(VERSION 3.16)
project(SFTK LANGUAGES CXX)
set(CXX_STANDARD_REQUIRED 23)
include(FetchContent)
FetchContent_Declare(SFML
GIT_REPOSITORY https://github.com/SFML/SFML.git
GIT_TAG 2.6.x)
FetchContent_MakeAvailable(SFML)
set(ROOT src/)
set(CONTAINER src/containers)
set(SOURCES ${SOURCES} ${ROOT}/window.cpp)
set(SOURCES ${SOURCES} ${CONTAINER}/container.cpp)
add_library(sftk SHARED ${SOURCES})
target_link_libraries(sftk PRIVATE sfml-graphics sfml-audio sfml-network)
target_include_directories(sftk PUBLIC include/)
add_executable(demo1 demo/demo1.cpp)
target_link_libraries(demo1 PRIVATE sftk sfml-graphics sfml-audio sfml-network)
target_include_directories(demo1 PRIVATE include/)