From 0a3897f60ae5fe57df789cca206e524cf75b9be5 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Fri, 11 Nov 2016 21:18:39 +0100 Subject: [PATCH] Refactor cmake file so the main part of the code is a lib. --- CMakeLists.txt | 135 +++++------------- ...fig.h.in => CloonelJumpProjectConfig.h.in} | 0 src/clooneljump/CMakeLists.txt | 13 ++ src/{ => clooneljump}/main.cpp | 2 +- src/jumping/CMakeLists.txt | 52 +++++++ src/{ => jumping}/casts.hpp | 0 src/{ => jumping}/character.cpp | 0 src/{ => jumping}/character.hpp | 0 src/{ => jumping}/collider.cpp | 0 src/{ => jumping}/collider.hpp | 0 src/{ => jumping}/collidertypedef.hpp | 0 src/{ => jumping}/collisionbarset.hpp | 0 src/{ => jumping}/colour.hpp | 0 src/{ => jumping}/compatibility.h | 0 src/{ => jumping}/drawable.cpp | 0 src/{ => jumping}/drawable.hpp | 0 src/{ => jumping}/drawableline.cpp | 0 src/{ => jumping}/drawableline.hpp | 0 src/{ => jumping}/drawableset.hpp | 0 src/{ => jumping}/gamebase.cpp | 0 src/{ => jumping}/gamebase.hpp | 0 src/{ => jumping}/gameplayscene.cpp | 0 src/{ => jumping}/gameplayscene.hpp | 0 src/{ => jumping}/gameplaysceneclassic.cpp | 0 src/{ => jumping}/gameplaysceneclassic.hpp | 0 src/{ => jumping}/geometry.cpp | 0 src/{ => jumping}/geometry.hpp | 0 src/{ => jumping}/geometry.inl | 0 src/{ => jumping}/geometry_2d.cpp | 0 src/{ => jumping}/geometry_2d.hpp | 0 src/{ => jumping}/geometry_2d.inl | 0 src/{ => jumping}/horzcollisionbar.cpp | 0 src/{ => jumping}/horzcollisionbar.hpp | 0 src/{ => jumping}/inputbag.cpp | 0 src/{ => jumping}/inputbag.hpp | 0 src/{ => jumping}/inputdevicetype.hpp | 0 src/{ => jumping}/key.hpp | 0 src/{ => jumping}/line.cpp | 0 src/{ => jumping}/line.hpp | 0 src/{ => jumping}/line.inl | 0 src/{ => jumping}/line_helpers.hpp | 0 src/{ => jumping}/line_helpers.inl | 0 src/{ => jumping}/maths.hpp | 0 src/{ => jumping}/movers/mover.cpp | 0 src/{ => jumping}/movers/mover.hpp | 0 src/{ => jumping}/movers/moverleftright.cpp | 0 src/{ => jumping}/movers/moverleftright.hpp | 0 src/{ => jumping}/movers/moveroneshot.cpp | 0 src/{ => jumping}/movers/moveroneshot.hpp | 0 src/{ => jumping}/movers/moverrelative.cpp | 0 src/{ => jumping}/movers/moverrelative.hpp | 0 src/{ => jumping}/movers/moversine.cpp | 0 src/{ => jumping}/movers/moversine.hpp | 0 src/{ => jumping}/movers/moverworld.cpp | 0 src/{ => jumping}/movers/moverworld.hpp | 0 src/{ => jumping}/observersmanager.hpp | 0 src/{ => jumping}/physicsfswrapper.cpp | 0 src/{ => jumping}/physicsfswrapper.hpp | 0 src/{ => jumping}/placeable.cpp | 0 src/{ => jumping}/placeable.hpp | 0 src/{ => jumping}/platform.cpp | 0 src/{ => jumping}/platform.hpp | 0 src/{ => jumping}/platformset.cpp | 0 src/{ => jumping}/platformset.hpp | 0 src/{ => jumping}/platformspawner.cpp | 0 src/{ => jumping}/platformspawner.hpp | 0 src/{ => jumping}/sdlerror.cpp | 0 src/{ => jumping}/sdlerror.hpp | 0 src/{ => jumping}/sdlmain.cpp | 0 src/{ => jumping}/sdlmain.hpp | 0 src/{ => jumping}/sizenotifiable.cpp | 0 src/{ => jumping}/sizenotifiable.hpp | 0 src/{ => jumping}/sizeratio.cpp | 0 src/{ => jumping}/sizeratio.hpp | 0 src/{ => jumping}/texture.cpp | 0 src/{ => jumping}/texture.hpp | 0 src/{ => jumping}/tiledwallpaper.cpp | 0 src/{ => jumping}/tiledwallpaper.hpp | 0 src/{ => jumping}/vectormath.cpp | 0 src/{ => jumping}/vectormath.hpp | 0 src/{ => jumping}/vectormath.inl | 0 src/{ => jumping}/vectypes.hpp | 0 test/unit/CMakeLists.txt | 7 +- 83 files changed, 111 insertions(+), 98 deletions(-) rename src/{CloonelJumpConfig.h.in => CloonelJumpProjectConfig.h.in} (100%) create mode 100644 src/clooneljump/CMakeLists.txt rename src/{ => clooneljump}/main.cpp (98%) create mode 100644 src/jumping/CMakeLists.txt rename src/{ => jumping}/casts.hpp (100%) rename src/{ => jumping}/character.cpp (100%) rename src/{ => jumping}/character.hpp (100%) rename src/{ => jumping}/collider.cpp (100%) rename src/{ => jumping}/collider.hpp (100%) rename src/{ => jumping}/collidertypedef.hpp (100%) rename src/{ => jumping}/collisionbarset.hpp (100%) rename src/{ => jumping}/colour.hpp (100%) rename src/{ => jumping}/compatibility.h (100%) rename src/{ => jumping}/drawable.cpp (100%) rename src/{ => jumping}/drawable.hpp (100%) rename src/{ => jumping}/drawableline.cpp (100%) rename src/{ => jumping}/drawableline.hpp (100%) rename src/{ => jumping}/drawableset.hpp (100%) rename src/{ => jumping}/gamebase.cpp (100%) rename src/{ => jumping}/gamebase.hpp (100%) rename src/{ => jumping}/gameplayscene.cpp (100%) rename src/{ => jumping}/gameplayscene.hpp (100%) rename src/{ => jumping}/gameplaysceneclassic.cpp (100%) rename src/{ => jumping}/gameplaysceneclassic.hpp (100%) rename src/{ => jumping}/geometry.cpp (100%) rename src/{ => jumping}/geometry.hpp (100%) rename src/{ => jumping}/geometry.inl (100%) rename src/{ => jumping}/geometry_2d.cpp (100%) rename src/{ => jumping}/geometry_2d.hpp (100%) rename src/{ => jumping}/geometry_2d.inl (100%) rename src/{ => jumping}/horzcollisionbar.cpp (100%) rename src/{ => jumping}/horzcollisionbar.hpp (100%) rename src/{ => jumping}/inputbag.cpp (100%) rename src/{ => jumping}/inputbag.hpp (100%) rename src/{ => jumping}/inputdevicetype.hpp (100%) rename src/{ => jumping}/key.hpp (100%) rename src/{ => jumping}/line.cpp (100%) rename src/{ => jumping}/line.hpp (100%) rename src/{ => jumping}/line.inl (100%) rename src/{ => jumping}/line_helpers.hpp (100%) rename src/{ => jumping}/line_helpers.inl (100%) rename src/{ => jumping}/maths.hpp (100%) rename src/{ => jumping}/movers/mover.cpp (100%) rename src/{ => jumping}/movers/mover.hpp (100%) rename src/{ => jumping}/movers/moverleftright.cpp (100%) rename src/{ => jumping}/movers/moverleftright.hpp (100%) rename src/{ => jumping}/movers/moveroneshot.cpp (100%) rename src/{ => jumping}/movers/moveroneshot.hpp (100%) rename src/{ => jumping}/movers/moverrelative.cpp (100%) rename src/{ => jumping}/movers/moverrelative.hpp (100%) rename src/{ => jumping}/movers/moversine.cpp (100%) rename src/{ => jumping}/movers/moversine.hpp (100%) rename src/{ => jumping}/movers/moverworld.cpp (100%) rename src/{ => jumping}/movers/moverworld.hpp (100%) rename src/{ => jumping}/observersmanager.hpp (100%) rename src/{ => jumping}/physicsfswrapper.cpp (100%) rename src/{ => jumping}/physicsfswrapper.hpp (100%) rename src/{ => jumping}/placeable.cpp (100%) rename src/{ => jumping}/placeable.hpp (100%) rename src/{ => jumping}/platform.cpp (100%) rename src/{ => jumping}/platform.hpp (100%) rename src/{ => jumping}/platformset.cpp (100%) rename src/{ => jumping}/platformset.hpp (100%) rename src/{ => jumping}/platformspawner.cpp (100%) rename src/{ => jumping}/platformspawner.hpp (100%) rename src/{ => jumping}/sdlerror.cpp (100%) rename src/{ => jumping}/sdlerror.hpp (100%) rename src/{ => jumping}/sdlmain.cpp (100%) rename src/{ => jumping}/sdlmain.hpp (100%) rename src/{ => jumping}/sizenotifiable.cpp (100%) rename src/{ => jumping}/sizenotifiable.hpp (100%) rename src/{ => jumping}/sizeratio.cpp (100%) rename src/{ => jumping}/sizeratio.hpp (100%) rename src/{ => jumping}/texture.cpp (100%) rename src/{ => jumping}/texture.hpp (100%) rename src/{ => jumping}/tiledwallpaper.cpp (100%) rename src/{ => jumping}/tiledwallpaper.hpp (100%) rename src/{ => jumping}/vectormath.cpp (100%) rename src/{ => jumping}/vectormath.hpp (100%) rename src/{ => jumping}/vectormath.inl (100%) rename src/{ => jumping}/vectypes.hpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index dfcd429..a4c164e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,21 +1,31 @@ cmake_minimum_required(VERSION 3.3 FATAL_ERROR) -project(CloonelJump CXX) +project(CloonelJumpProject CXX) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/include") include(TargetArch) include(CTest) +include(FindPkgConfig) +include(CMakeDependentOption) + +find_package(PNG REQUIRED) +find_package(Boost 1.55.0 REQUIRED) +find_package(PhysFS 2.0.3) +PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wconversion") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -pedantic -Wconversion -DWITH_DEBUG_VISUALS -O0") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -Wextra -pedantic -Wconversion -O3") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -O0") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3") +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CLOONEL_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}") target_architecture(TARGET_ARCH) message (STATUS "Target architecture: ${TARGET_ARCH}") -option(WITH_BUILTIN_PHYSFS "Force using the version of PhysFS accompanying the code even if a system library is available" OFF) +cmake_dependent_option(WITH_BUILTIN_PHYSFS "Force using the version of PhysFS accompanying the code even if a system library is available" OFF "PHYSFS_FOUND" ON) option(FORCE_OPENGLES "Try to chose the openGL ES renderer if available. Enable this on Raspberry Pi" OFF) option(RASPBERRY_PI "Compile for Raspberry Pi" OFF) @@ -27,34 +37,19 @@ if (TARGET_ARCH MATCHES "^x86_64$") endif (TARGET_ARCH MATCHES "^x86_64$") if (FORCE_OPENGLES OR RASPBERRY_PI) - add_definitions(-DFORCE_OPENGLES) + target_add_definitions(${PROJECT_NAME} INTERFACE -DFORCE_OPENGLES) if (RASPBERRY_PI) - add_definitions(-DRASPBERRY_PI) + target_add_definitions(${PROJECT_NAME} INTERFACE -DRASPBERRY_PI) endif(RASPBERRY_PI) endif (FORCE_OPENGLES OR RASPBERRY_PI) -include(FindPkgConfig) -PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2) - -find_package(PNG REQUIRED) -find_package(Boost 1.55.0 REQUIRED) -if (NOT WITH_BUILTIN_PHYSFS) - find_package(PhysFS 2.0.3) -endif() - -if (PHYSFS_FOUND) - message(STATUS "Using system's PhysFS, set WITH_BUILTIN_PHYSFS to on to override this") -else(PHYSFS_FOUND) +if (WITH_BUILTIN_PHYSFS) message(STATUS "Using internal PhysFS") set(PHYSFS_INCLUDE_DIR "lib/physfs-2.0.3") set(PHYSFS_LIBRARY "physfs") -endif(PHYSFS_FOUND) - -add_definitions( - ${PNG_DEFINITIONS} -# -DWITH_VERBOSE_OBS_MANAGER - -DWITH_VERBOSE_COLLIDER -) +else(WITH_BUILTIN_PHYSFS) + message(STATUS "Using system's PhysFS, set WITH_BUILTIN_PHYSFS to on to override this") +endif(WITH_BUILTIN_PHYSFS) if (RASPBERRY_PI) message(STATUS "Will build for Raspberry Pi") @@ -68,19 +63,22 @@ if (RASPBERRY_PI) ) endif (RASPBERRY_PI) -include_directories(SYSTEM - ${SDL2_INCLUDE_DIR} - ${PNG_INCLUDE_DIRS} - ${Boost_INCLUDE_DIRS} - lib/tree-3.1/src +add_library(${PROJECT_NAME} INTERFACE) + +target_include_directories(${PROJECT_NAME} SYSTEM + INTERFACE ${Boost_INCLUDE_DIRS} ) -include_directories( - src - src/movers - include - "${PROJECT_BINARY_DIR}" - ${PHYSFS_INCLUDE_DIR} - lib/vectorwrapper/include + +target_include_directories(${PROJECT_NAME} + INTERFACE "${PROJECT_BINARY_DIR}" + INTERFACE lib/vectorwrapper/include + INTERFACE lib/tree-3.1/src +) + +target_compile_definitions(${PROJECT_NAME} + INTERFACE VWR_STATIC_CAST_RESULTS + INTERFACE VWR_SIZE_TYPE=uint32_t + INTERFACE ${PNG_DEFINITIONS} ) configure_file( @@ -88,73 +86,18 @@ configure_file( "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.h" ) -if (NOT PHYSFS_FOUND) - add_subdirectory(lib/physfs-2.0.3) -endif(NOT PHYSFS_FOUND) - -add_executable(${PROJECT_NAME} - src/main.cpp - src/texture.cpp - src/sdlerror.cpp - src/sdlmain.cpp - src/gamebase.cpp - src/character.cpp - src/placeable.cpp - src/physicsfswrapper.cpp - src/gameplayscene.cpp - src/movers/mover.cpp - src/movers/moveroneshot.cpp - src/movers/moversine.cpp - src/gameplaysceneclassic.cpp - src/movers/moverrelative.cpp - src/inputbag.cpp - src/movers/moverleftright.cpp - src/tiledwallpaper.cpp - src/drawable.cpp - src/sizeratio.cpp - src/sizenotifiable.cpp - src/horzcollisionbar.cpp - src/platform.cpp - src/vectormath.cpp - src/platformspawner.cpp - src/movers/moverworld.cpp - src/line.cpp - src/collider.cpp - src/platformset.cpp - src/drawableline.cpp -) - -target_link_libraries(${PROJECT_NAME} - ${SDL2_LIBRARIES} - ${PHYSFS_LIBRARY} - ${PNG_LIBRARIES} -) - -target_compile_definitions(${PROJECT_NAME} - PRIVATE VWR_STATIC_CAST_RESULTS - PRIVATE VWR_SIZE_TYPE=uint32_t -) - if (RASPBERRY_PI) target_link_libraries(${PROJECT_NAME} bcm_host ) endif(RASPBERRY_PI) +if (NOT PHYSFS_FOUND) + add_subdirectory(lib/physfs-2.0.3) +endif(NOT PHYSFS_FOUND) + +add_subdirectory(src/jumping) +add_subdirectory(src/clooneljump) if (BUILD_TESTING) add_subdirectory(test/unit) endif() -target_compile_features(${PROJECT_NAME} - PRIVATE cxx_nullptr - PRIVATE cxx_range_for - PRIVATE cxx_lambdas - PRIVATE cxx_decltype_auto - PRIVATE cxx_defaulted_functions - PRIVATE cxx_deleted_functions - PRIVATE cxx_auto_type - PRIVATE cxx_decltype_incomplete_return_types - PRIVATE cxx_defaulted_move_initializers - PRIVATE cxx_noexcept - PRIVATE cxx_rvalue_references - PRIVATE cxx_delegating_constructors -) diff --git a/src/CloonelJumpConfig.h.in b/src/CloonelJumpProjectConfig.h.in similarity index 100% rename from src/CloonelJumpConfig.h.in rename to src/CloonelJumpProjectConfig.h.in diff --git a/src/clooneljump/CMakeLists.txt b/src/clooneljump/CMakeLists.txt new file mode 100644 index 0000000..eccfc98 --- /dev/null +++ b/src/clooneljump/CMakeLists.txt @@ -0,0 +1,13 @@ +project(clooneljump CXX) + +add_executable(${PROJECT_NAME} + main.cpp +) + +target_link_libraries(${PROJECT_NAME} + PRIVATE jumping +) + +target_include_directories(${PROJECT_NAME} + PRIVATE ${CLOONEL_SRC_DIR}/src/jumping +) diff --git a/src/main.cpp b/src/clooneljump/main.cpp similarity index 98% rename from src/main.cpp rename to src/clooneljump/main.cpp index d0f9b24..c627614 100644 --- a/src/main.cpp +++ b/src/clooneljump/main.cpp @@ -17,7 +17,7 @@ along with CloonelJump. If not, see . */ -#include "CloonelJumpConfig.h" +#include "CloonelJumpProjectConfig.h" #include "sdlmain.hpp" #include "physicsfswrapper.hpp" #include "gameplaysceneclassic.hpp" diff --git a/src/jumping/CMakeLists.txt b/src/jumping/CMakeLists.txt new file mode 100644 index 0000000..3873132 --- /dev/null +++ b/src/jumping/CMakeLists.txt @@ -0,0 +1,52 @@ +project(jumping CXX) + +add_library(${PROJECT_NAME} + texture.cpp + sdlerror.cpp + sdlmain.cpp + gamebase.cpp + character.cpp + placeable.cpp + physicsfswrapper.cpp + gameplayscene.cpp + movers/mover.cpp + movers/moveroneshot.cpp + movers/moversine.cpp + gameplaysceneclassic.cpp + movers/moverrelative.cpp + inputbag.cpp + movers/moverleftright.cpp + tiledwallpaper.cpp + drawable.cpp + sizeratio.cpp + sizenotifiable.cpp + horzcollisionbar.cpp + platform.cpp + vectormath.cpp + platformspawner.cpp + movers/moverworld.cpp + line.cpp + collider.cpp + platformset.cpp + drawableline.cpp +) + +target_link_libraries(${PROJECT_NAME} + PRIVATE ${SDL2_LIBRARIES} + PRIVATE ${PHYSFS_LIBRARY} + PRIVATE ${PNG_LIBRARIES} + PUBLIC CloonelJumpProject +) + +target_include_directories(${PROJECT_NAME} + PRIVATE ${SDL2_INCLUDE_DIR} + PRIVATE ${PNG_INCLUDE_DIRS} + PRIVATE . + PRIVATE movers + PRIVATE ${PHYSFS_INCLUDE_DIR} +) + +target_compile_definitions(${PROJECT_NAME} +# INTERFACE WITH_VERBOSE_OBS_MANAGER + INTERFACE WITH_VERBOSE_COLLIDER +) diff --git a/src/casts.hpp b/src/jumping/casts.hpp similarity index 100% rename from src/casts.hpp rename to src/jumping/casts.hpp diff --git a/src/character.cpp b/src/jumping/character.cpp similarity index 100% rename from src/character.cpp rename to src/jumping/character.cpp diff --git a/src/character.hpp b/src/jumping/character.hpp similarity index 100% rename from src/character.hpp rename to src/jumping/character.hpp diff --git a/src/collider.cpp b/src/jumping/collider.cpp similarity index 100% rename from src/collider.cpp rename to src/jumping/collider.cpp diff --git a/src/collider.hpp b/src/jumping/collider.hpp similarity index 100% rename from src/collider.hpp rename to src/jumping/collider.hpp diff --git a/src/collidertypedef.hpp b/src/jumping/collidertypedef.hpp similarity index 100% rename from src/collidertypedef.hpp rename to src/jumping/collidertypedef.hpp diff --git a/src/collisionbarset.hpp b/src/jumping/collisionbarset.hpp similarity index 100% rename from src/collisionbarset.hpp rename to src/jumping/collisionbarset.hpp diff --git a/src/colour.hpp b/src/jumping/colour.hpp similarity index 100% rename from src/colour.hpp rename to src/jumping/colour.hpp diff --git a/src/compatibility.h b/src/jumping/compatibility.h similarity index 100% rename from src/compatibility.h rename to src/jumping/compatibility.h diff --git a/src/drawable.cpp b/src/jumping/drawable.cpp similarity index 100% rename from src/drawable.cpp rename to src/jumping/drawable.cpp diff --git a/src/drawable.hpp b/src/jumping/drawable.hpp similarity index 100% rename from src/drawable.hpp rename to src/jumping/drawable.hpp diff --git a/src/drawableline.cpp b/src/jumping/drawableline.cpp similarity index 100% rename from src/drawableline.cpp rename to src/jumping/drawableline.cpp diff --git a/src/drawableline.hpp b/src/jumping/drawableline.hpp similarity index 100% rename from src/drawableline.hpp rename to src/jumping/drawableline.hpp diff --git a/src/drawableset.hpp b/src/jumping/drawableset.hpp similarity index 100% rename from src/drawableset.hpp rename to src/jumping/drawableset.hpp diff --git a/src/gamebase.cpp b/src/jumping/gamebase.cpp similarity index 100% rename from src/gamebase.cpp rename to src/jumping/gamebase.cpp diff --git a/src/gamebase.hpp b/src/jumping/gamebase.hpp similarity index 100% rename from src/gamebase.hpp rename to src/jumping/gamebase.hpp diff --git a/src/gameplayscene.cpp b/src/jumping/gameplayscene.cpp similarity index 100% rename from src/gameplayscene.cpp rename to src/jumping/gameplayscene.cpp diff --git a/src/gameplayscene.hpp b/src/jumping/gameplayscene.hpp similarity index 100% rename from src/gameplayscene.hpp rename to src/jumping/gameplayscene.hpp diff --git a/src/gameplaysceneclassic.cpp b/src/jumping/gameplaysceneclassic.cpp similarity index 100% rename from src/gameplaysceneclassic.cpp rename to src/jumping/gameplaysceneclassic.cpp diff --git a/src/gameplaysceneclassic.hpp b/src/jumping/gameplaysceneclassic.hpp similarity index 100% rename from src/gameplaysceneclassic.hpp rename to src/jumping/gameplaysceneclassic.hpp diff --git a/src/geometry.cpp b/src/jumping/geometry.cpp similarity index 100% rename from src/geometry.cpp rename to src/jumping/geometry.cpp diff --git a/src/geometry.hpp b/src/jumping/geometry.hpp similarity index 100% rename from src/geometry.hpp rename to src/jumping/geometry.hpp diff --git a/src/geometry.inl b/src/jumping/geometry.inl similarity index 100% rename from src/geometry.inl rename to src/jumping/geometry.inl diff --git a/src/geometry_2d.cpp b/src/jumping/geometry_2d.cpp similarity index 100% rename from src/geometry_2d.cpp rename to src/jumping/geometry_2d.cpp diff --git a/src/geometry_2d.hpp b/src/jumping/geometry_2d.hpp similarity index 100% rename from src/geometry_2d.hpp rename to src/jumping/geometry_2d.hpp diff --git a/src/geometry_2d.inl b/src/jumping/geometry_2d.inl similarity index 100% rename from src/geometry_2d.inl rename to src/jumping/geometry_2d.inl diff --git a/src/horzcollisionbar.cpp b/src/jumping/horzcollisionbar.cpp similarity index 100% rename from src/horzcollisionbar.cpp rename to src/jumping/horzcollisionbar.cpp diff --git a/src/horzcollisionbar.hpp b/src/jumping/horzcollisionbar.hpp similarity index 100% rename from src/horzcollisionbar.hpp rename to src/jumping/horzcollisionbar.hpp diff --git a/src/inputbag.cpp b/src/jumping/inputbag.cpp similarity index 100% rename from src/inputbag.cpp rename to src/jumping/inputbag.cpp diff --git a/src/inputbag.hpp b/src/jumping/inputbag.hpp similarity index 100% rename from src/inputbag.hpp rename to src/jumping/inputbag.hpp diff --git a/src/inputdevicetype.hpp b/src/jumping/inputdevicetype.hpp similarity index 100% rename from src/inputdevicetype.hpp rename to src/jumping/inputdevicetype.hpp diff --git a/src/key.hpp b/src/jumping/key.hpp similarity index 100% rename from src/key.hpp rename to src/jumping/key.hpp diff --git a/src/line.cpp b/src/jumping/line.cpp similarity index 100% rename from src/line.cpp rename to src/jumping/line.cpp diff --git a/src/line.hpp b/src/jumping/line.hpp similarity index 100% rename from src/line.hpp rename to src/jumping/line.hpp diff --git a/src/line.inl b/src/jumping/line.inl similarity index 100% rename from src/line.inl rename to src/jumping/line.inl diff --git a/src/line_helpers.hpp b/src/jumping/line_helpers.hpp similarity index 100% rename from src/line_helpers.hpp rename to src/jumping/line_helpers.hpp diff --git a/src/line_helpers.inl b/src/jumping/line_helpers.inl similarity index 100% rename from src/line_helpers.inl rename to src/jumping/line_helpers.inl diff --git a/src/maths.hpp b/src/jumping/maths.hpp similarity index 100% rename from src/maths.hpp rename to src/jumping/maths.hpp diff --git a/src/movers/mover.cpp b/src/jumping/movers/mover.cpp similarity index 100% rename from src/movers/mover.cpp rename to src/jumping/movers/mover.cpp diff --git a/src/movers/mover.hpp b/src/jumping/movers/mover.hpp similarity index 100% rename from src/movers/mover.hpp rename to src/jumping/movers/mover.hpp diff --git a/src/movers/moverleftright.cpp b/src/jumping/movers/moverleftright.cpp similarity index 100% rename from src/movers/moverleftright.cpp rename to src/jumping/movers/moverleftright.cpp diff --git a/src/movers/moverleftright.hpp b/src/jumping/movers/moverleftright.hpp similarity index 100% rename from src/movers/moverleftright.hpp rename to src/jumping/movers/moverleftright.hpp diff --git a/src/movers/moveroneshot.cpp b/src/jumping/movers/moveroneshot.cpp similarity index 100% rename from src/movers/moveroneshot.cpp rename to src/jumping/movers/moveroneshot.cpp diff --git a/src/movers/moveroneshot.hpp b/src/jumping/movers/moveroneshot.hpp similarity index 100% rename from src/movers/moveroneshot.hpp rename to src/jumping/movers/moveroneshot.hpp diff --git a/src/movers/moverrelative.cpp b/src/jumping/movers/moverrelative.cpp similarity index 100% rename from src/movers/moverrelative.cpp rename to src/jumping/movers/moverrelative.cpp diff --git a/src/movers/moverrelative.hpp b/src/jumping/movers/moverrelative.hpp similarity index 100% rename from src/movers/moverrelative.hpp rename to src/jumping/movers/moverrelative.hpp diff --git a/src/movers/moversine.cpp b/src/jumping/movers/moversine.cpp similarity index 100% rename from src/movers/moversine.cpp rename to src/jumping/movers/moversine.cpp diff --git a/src/movers/moversine.hpp b/src/jumping/movers/moversine.hpp similarity index 100% rename from src/movers/moversine.hpp rename to src/jumping/movers/moversine.hpp diff --git a/src/movers/moverworld.cpp b/src/jumping/movers/moverworld.cpp similarity index 100% rename from src/movers/moverworld.cpp rename to src/jumping/movers/moverworld.cpp diff --git a/src/movers/moverworld.hpp b/src/jumping/movers/moverworld.hpp similarity index 100% rename from src/movers/moverworld.hpp rename to src/jumping/movers/moverworld.hpp diff --git a/src/observersmanager.hpp b/src/jumping/observersmanager.hpp similarity index 100% rename from src/observersmanager.hpp rename to src/jumping/observersmanager.hpp diff --git a/src/physicsfswrapper.cpp b/src/jumping/physicsfswrapper.cpp similarity index 100% rename from src/physicsfswrapper.cpp rename to src/jumping/physicsfswrapper.cpp diff --git a/src/physicsfswrapper.hpp b/src/jumping/physicsfswrapper.hpp similarity index 100% rename from src/physicsfswrapper.hpp rename to src/jumping/physicsfswrapper.hpp diff --git a/src/placeable.cpp b/src/jumping/placeable.cpp similarity index 100% rename from src/placeable.cpp rename to src/jumping/placeable.cpp diff --git a/src/placeable.hpp b/src/jumping/placeable.hpp similarity index 100% rename from src/placeable.hpp rename to src/jumping/placeable.hpp diff --git a/src/platform.cpp b/src/jumping/platform.cpp similarity index 100% rename from src/platform.cpp rename to src/jumping/platform.cpp diff --git a/src/platform.hpp b/src/jumping/platform.hpp similarity index 100% rename from src/platform.hpp rename to src/jumping/platform.hpp diff --git a/src/platformset.cpp b/src/jumping/platformset.cpp similarity index 100% rename from src/platformset.cpp rename to src/jumping/platformset.cpp diff --git a/src/platformset.hpp b/src/jumping/platformset.hpp similarity index 100% rename from src/platformset.hpp rename to src/jumping/platformset.hpp diff --git a/src/platformspawner.cpp b/src/jumping/platformspawner.cpp similarity index 100% rename from src/platformspawner.cpp rename to src/jumping/platformspawner.cpp diff --git a/src/platformspawner.hpp b/src/jumping/platformspawner.hpp similarity index 100% rename from src/platformspawner.hpp rename to src/jumping/platformspawner.hpp diff --git a/src/sdlerror.cpp b/src/jumping/sdlerror.cpp similarity index 100% rename from src/sdlerror.cpp rename to src/jumping/sdlerror.cpp diff --git a/src/sdlerror.hpp b/src/jumping/sdlerror.hpp similarity index 100% rename from src/sdlerror.hpp rename to src/jumping/sdlerror.hpp diff --git a/src/sdlmain.cpp b/src/jumping/sdlmain.cpp similarity index 100% rename from src/sdlmain.cpp rename to src/jumping/sdlmain.cpp diff --git a/src/sdlmain.hpp b/src/jumping/sdlmain.hpp similarity index 100% rename from src/sdlmain.hpp rename to src/jumping/sdlmain.hpp diff --git a/src/sizenotifiable.cpp b/src/jumping/sizenotifiable.cpp similarity index 100% rename from src/sizenotifiable.cpp rename to src/jumping/sizenotifiable.cpp diff --git a/src/sizenotifiable.hpp b/src/jumping/sizenotifiable.hpp similarity index 100% rename from src/sizenotifiable.hpp rename to src/jumping/sizenotifiable.hpp diff --git a/src/sizeratio.cpp b/src/jumping/sizeratio.cpp similarity index 100% rename from src/sizeratio.cpp rename to src/jumping/sizeratio.cpp diff --git a/src/sizeratio.hpp b/src/jumping/sizeratio.hpp similarity index 100% rename from src/sizeratio.hpp rename to src/jumping/sizeratio.hpp diff --git a/src/texture.cpp b/src/jumping/texture.cpp similarity index 100% rename from src/texture.cpp rename to src/jumping/texture.cpp diff --git a/src/texture.hpp b/src/jumping/texture.hpp similarity index 100% rename from src/texture.hpp rename to src/jumping/texture.hpp diff --git a/src/tiledwallpaper.cpp b/src/jumping/tiledwallpaper.cpp similarity index 100% rename from src/tiledwallpaper.cpp rename to src/jumping/tiledwallpaper.cpp diff --git a/src/tiledwallpaper.hpp b/src/jumping/tiledwallpaper.hpp similarity index 100% rename from src/tiledwallpaper.hpp rename to src/jumping/tiledwallpaper.hpp diff --git a/src/vectormath.cpp b/src/jumping/vectormath.cpp similarity index 100% rename from src/vectormath.cpp rename to src/jumping/vectormath.cpp diff --git a/src/vectormath.hpp b/src/jumping/vectormath.hpp similarity index 100% rename from src/vectormath.hpp rename to src/jumping/vectormath.hpp diff --git a/src/vectormath.inl b/src/jumping/vectormath.inl similarity index 100% rename from src/vectormath.inl rename to src/jumping/vectormath.inl diff --git a/src/vectypes.hpp b/src/jumping/vectypes.hpp similarity index 100% rename from src/vectypes.hpp rename to src/jumping/vectypes.hpp diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index e4981c5..18bbeb2 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -5,7 +5,12 @@ add_executable(${PROJECT_NAME} ) target_include_directories(${PROJECT_NAME} - PRIVATE ${CMAKE_SOURCE_DIR}/lib/catch/single_include + PRIVATE ${CLOONEL_SRC_DIR}/lib/catch/single_include + PRIVATE ${CLOONEL_SRC_DIR}/src/jumping +) + +target_link_libraries(${PROJECT_NAME} + PRIVATE jumping ) add_test(