2021-04-03 19:14:31 +02:00
|
|
|
cmake_minimum_required(VERSION 3.5)
|
|
|
|
|
|
|
|
project(project-kyoku LANGUAGES CXX)
|
|
|
|
|
2021-06-09 20:08:58 +02:00
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
2021-04-03 19:14:31 +02:00
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
2021-06-09 20:08:58 +02:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g")
|
2021-05-24 19:18:44 +02:00
|
|
|
file(GLOB SOURCES "src/*.cpp" "src/classicgame/*")
|
2021-04-03 19:14:31 +02:00
|
|
|
|
|
|
|
# STATIC #
|
|
|
|
# You need to build SFML from sources with cmake
|
2021-04-28 18:14:18 +02:00
|
|
|
set(SFML_LIB_DIR
|
|
|
|
${CMAKE_SOURCE_DIR}/SFML-2.5.1/lib/libsfml-graphics.so.2.5
|
|
|
|
${CMAKE_SOURCE_DIR}/SFML-2.5.1/lib/libsfml-system.so.2.5
|
|
|
|
${CMAKE_SOURCE_DIR}/SFML-2.5.1/lib/libsfml-window.so.2.5
|
|
|
|
${CMAKE_SOURCE_DIR}/SFML-2.5.1/lib/libsfml-audio.so.2.5)
|
|
|
|
set(SFML_INCL_DIR ${CMAKE_SOURCE_DIR}/SFML-2.5.1/include)
|
2021-05-24 19:18:44 +02:00
|
|
|
include_directories(${SFML_INCL_DIR} ${CMAKE_SOURCE_DIR}/include)
|
2021-04-28 18:14:18 +02:00
|
|
|
add_executable(project-kyoku ${SOURCES})
|
|
|
|
target_link_libraries(project-kyoku ${SFML_LIB_DIR})
|
2021-04-04 22:43:12 +02:00
|
|
|
|
|
|
|
# DYNAMIC #
|
|
|
|
# You only need to install SFML from your package manager
|
2021-04-28 18:14:18 +02:00
|
|
|
#find_package(SFML REQUIRED graphics window system)
|
|
|
|
#add_executable(project-kyoku ${SOURCES})
|
|
|
|
#target_link_libraries(project-kyoku sfml-system sfml-audio sfml-graphics sfml-network)
|