Move headers into `simpleengine` directory.
This commit is contained in:
parent
4d87f53cf2
commit
7a1c31375d
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required (VERSION 3.6)
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")
|
||||
project(GameEngine)
|
||||
project(SimpleEngine)
|
||||
|
||||
# Add some CMake options:
|
||||
option(BUILD_EXAMPLES "Build example projects" ON)
|
||||
|
@ -14,13 +14,13 @@ find_package(SFML REQUIRED COMPONENTS system main window graphics audio)
|
|||
|
||||
# Link sources
|
||||
file(GLOB_RECURSE source_list src/*.cpp)
|
||||
add_library(gameengine STATIC ${source_list})
|
||||
add_library(simpleengine STATIC ${source_list})
|
||||
|
||||
# Link headers
|
||||
target_include_directories(gameengine PUBLIC include PRIVATE include/gameengine)
|
||||
target_include_directories(simpleengine PUBLIC include PRIVATE include/simpleengine)
|
||||
|
||||
# Link dependencies
|
||||
target_link_libraries(gameengine PUBLIC sfml-system sfml-main sfml-window OpenGL sfml-network sfml-graphics Freetype OpenAL Vorbis FLAC sfml-audio)
|
||||
target_link_libraries(simpleengine PUBLIC sfml-system sfml-main sfml-window OpenGL sfml-network sfml-graphics Freetype OpenAL Vorbis FLAC sfml-audio)
|
||||
|
||||
# Add examples as a target if the user has them enabled
|
||||
if (BUILD_EXAMPLES)
|
||||
|
@ -28,4 +28,4 @@ if (BUILD_EXAMPLES)
|
|||
endif()
|
||||
|
||||
# Set C++ standard to C++17
|
||||
set_target_properties(gameengine PROPERTIES CXX_STANDARD 17 CXX_EXTENSIONS OFF)
|
||||
set_target_properties(simpleengine PROPERTIES CXX_STANDARD 17 CXX_EXTENSIONS OFF)
|
|
@ -8,8 +8,8 @@ file(GLOB_RECURSE source_list src/*.cpp)
|
|||
target_sources(first_example PRIVATE ${source_list})
|
||||
target_include_directories(first_example PUBLIC include)
|
||||
|
||||
# Link gameengine
|
||||
target_link_libraries(first_example PUBLIC gameengine)
|
||||
# Link simpleengine
|
||||
target_link_libraries(first_example PUBLIC simpleengine)
|
||||
|
||||
# Set standard to C++17
|
||||
set_target_properties(first_example PROPERTIES CXX_STANDARD 17 CXX_EXTENSIONS OFF)
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
#include <gameengine/game.h>
|
||||
#include <gameengine/event.h>
|
||||
#include <gameengine/entity.h>
|
||||
#include <simpleengine/game.h>
|
||||
#include <simpleengine/event.h>
|
||||
#include <simpleengine/entity.h>
|
||||
|
||||
class PlayerEntity : public simpleengine::Entity {
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue