diff options
author | Nao Pross <naopross@thearcway.org> | 2018-02-16 21:10:24 +0100 |
---|---|---|
committer | Nao Pross <naopross@thearcway.org> | 2018-02-16 21:10:24 +0100 |
commit | 1010d0d526ad7419449f19ac4db42d63f7731540 (patch) | |
tree | e037bc5f4f30ffc5324cccc9a3b018f7937c2bab /CMakeLists.txt | |
parent | Add RangedWeapon, MeleeWeapon (diff) | |
download | Subconscious-old-1010d0d526ad7419449f19ac4db42d63f7731540.tar.gz Subconscious-old-1010d0d526ad7419449f19ac4db42d63f7731540.zip |
Add basic widget implementation (not usable) and configure cmake
Diffstat (limited to '')
-rw-r--r-- | CMakeLists.txt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..6b81e25 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 2.6) + +if (NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build (Debug or Release)" FORCE) +endif() + +project(subconscious) + +# Configuration headers +set(subconscious_VERSION_MAJOR 0) +set(subconscious_VERSION_MINOR 1) +configure_file( + "${PROJECT_SOURCE_DIR}/src/main/headers/config.h.in" + "${PROJECT_SOURCE_DIR}/src/main/headers/config.h" +) + +# include directories +include_directories("${PROJECT_SOURCE_DIR}/src/main/headers") + +# sources +file(GLOB_RECURSE SOURCES RELATIVE ${CMAKE_SOURCE_DIR} "src/main/cpp/*.cpp") + +# executable +set(EXECUTABLE_NAME "subconscious") +add_executable(${EXECUTABLE_NAME} ${SOURCES}) + +# SFML library +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH}) +find_package(SFML 2 REQUIRED network audio graphics window system) +if (SFML_FOUND) + include_directories(${SFML_INCLUDE_DIR}) + target_link_libraries(${EXECUTABLE_NAME} ${SFML_LIBRARIES} ${SFML_DEPENDENCIES}) +endif () + +# install target +install(TARGETS ${EXECUTABLE_NAME} DESTINATION bin) |