tsp_cpp/snippets/CMakeLists.txt

20 lines
534 B
Text
Raw Normal View History

2019-04-25 10:23:38 +02:00
cmake_minimum_required(VERSION 3.13)
project(snippets)
set(CMAKE_CXX_STANDARD 14)
add_executable(pM pietMondrian.cpp)
# Detect and add SFML
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
find_package(SFML COMPONENTS system window graphics network audio REQUIRED)
if(SFML_FOUND)
set(SFML_MODULES sfml-system sfml-window sfml-graphics sfml-network sfml-audio)
target_link_libraries(pM ${SFML_MODULES})
endif()
if(NOT SFML_FOUND)
message(FATAL_ERROR "SFML couldn't be located!")
endif()