holesome/CMakeLists.txt

187 lines
7 KiB
CMake

cmake_minimum_required(VERSION 3.12)
project(Holesome)
set(CMAKE_CXX_STANDARD 20)
# Find and include SFML
find_package(SFML 2.5 COMPONENTS graphics audio REQUIRED)
include_directories(${SFML_INCLUDE_DIR})
# Find and include Eigen
find_package(Eigen3 3.3 REQUIRED NO_MODULE)
include_directories(${EIGEN3_INCLUDE_DIR})
# Include Box2D
find_package(box2d REQUIRED)
include_directories(${BOX2D_INCLUDE_DIR})
# Set up your project's source files
set(SOURCES
src/main.cpp
src/game/game_object.cpp
src/game/game_object.h
src/game/game.h
src/game/game.cpp
src/logging/easylogging++.cc
src/logging/easylogging++.h
src/coordinates/coordinate_transformer.cpp
src/coordinates/coordinate_transformer.h
src/coordinates/translated_coordinates.cpp
src/coordinates/translated_coordinates.h
src/coordinates/coordinates.h
src/primitives/circle_object.cpp
src/primitives/circle_object.h
src/game/game_factory.cpp
src/game/game_factory.hpp
src/config.h
src/debug/grid_debug_layer.cpp
src/debug/grid_debug_layer.h
src/game/input/input_mapper.h
src/game/input/input_mapper.cpp
src/game/input/direction.h
src/game/input/direction.cpp
src/game/player/player.cpp
src/game/player/player.hpp
src/game/camera/tracking_view.cpp
src/game/camera/tracking_view.h
src/utilities/smart_list.cpp
src/utilities/smart_list.h
src/utilities/vector_utils.hpp
src/game/camera/ITrackable.h
src/game/input/input_identity.h
src/utilities/magic_enum.hpp
src/game/camera/tracking_area.h
src/game/camera/tracking_view_options.hpp
src/game/collectables/collectable.cpp
src/game/collectables/collectable.hpp
src/sprites/texture_manager.cpp
src/sprites/texture_manager.hpp
src/sprites/sprite_sheet.cpp
src/sprites/sprite_sheet.hpp
src/sprites/animated_sprite.cpp
src/sprites/animated_sprite.hpp
src/sprites/single_sprite.cpp
src/sprites/single_sprite.hpp
src/texture_config.h
src/sprites/configs/sprite_config.hpp
src/sprites/configs/sheet_config.hpp
src/sprites/configs/animation_config.hpp
src/sprites/versatile_sprite.cpp
src/sprites/versatile_sprite.hpp
src/sprites/sprite.hpp
src/sprites/sprite_factory.cpp
src/sprites/sprite_factory.hpp
src/input_config.h
src/game/input/button_config.hpp
src/game/input/game_action.hpp
src/game/input/button_config_factory.cpp
src/game/input/button_config_factory.hpp
src/game/input/game_action_config.hpp
src/game/input/gamepad_buttons.hpp
src/game/physics/map/map_simulation.cpp
src/game/physics/map/map_simulation.hpp
src/game/physics/map/map_player.hpp
src/game/physics/map/map_player.cpp
src/game/level/level_config.hpp
src/game/level/level_loader.cpp
src/game/level/level_loader.hpp
src/levels.hpp src/collectables.hpp
src/game/collectables/collectable_config.hpp
src/game/collectables/collection/collectables_collection.cpp
src/game/collectables/collection/collectables_collection.hpp
src/game/collectables/collection/collectables_depth_collection.cpp
src/game/collectables/collection/collectables_depth_collection.hpp
src/game/collectables/collectable_in_level.hpp
src/game/collectables/collectable_factory.cpp
src/game/collectables/collectable_factory.hpp
src/game/player/player_collection.cpp
src/game/player/player_collection.hpp
src/levels.hpp
src/sprites/tiling/tilemap.cpp
src/sprites/tiling/tilemap.hpp
src/sprites/tiling/tilemap_config.hpp
src/sprites/tiling/tileset_config.hpp
src/sprites/tiling/tileset.cpp
src/sprites/tiling/tileset.hpp
src/game/frame_counter.cpp
src/game/frame_counter.hpp
src/game/level/level_renderer.cpp
src/game/level/level_renderer.hpp
src/sprites/skymap/skymap.cpp
src/sprites/skymap/skymap.hpp
src/game/camera/multiplayer_view.cpp
src/game/camera/multiplayer_view.hpp
src/game/camera/multiplayer_borders.cpp
src/game/camera/multiplayer_borders.hpp
src/game/physics/holes/collectable_simulation.cpp
src/game/physics/holes/collectable_simulation.hpp
src/game/physics/holes/holes_simulation.cpp
src/game/physics/holes/holes_simulation.hpp
src/game/physics/holes/layouts/hole_description.hpp
src/game/physics/holes/layouts/hole_layout.cpp
src/game/physics/holes/layouts/hole_layout.hpp
src/game/physics/holes/layouts/depth_hole_layout.hpp
src/game/physics/holes/layouts/depth_hole_description.hpp
src/game/physics/holes/ground/collectable_sim_ground_segment.hpp
src/game/physics/holes/ground/collectable_sim_ground.cpp
src/game/physics/holes/ground/collectable_sim_ground.hpp
src/game/physics/body_adapter.cpp
src/game/physics/body_adapter.hpp
src/sprites/masked_sprite.cpp
src/sprites/masked_sprite.hpp
src/sprites/configs/masked_sprite_config.hpp
src/sprites/masked_sprite_hole.hpp
src/game/time/countdown.cpp
src/game/time/countdown.hpp
src/game/layer/global_layer.cpp
src/game/layer/global_layer.hpp
src/typography/font_manager.cpp
src/typography/font_manager.hpp
src/screens/winner_screen.cpp
src/screens/winner_screen.hpp src/screens/screen.cpp src/screens/screen.hpp src/screens/join_screen.cpp src/screens/join_screen.hpp)
set(PHYSICS_00_SOURCES
src/prototypes/physics_00.cpp)
set(MATH_00_SOURCES
src/prototypes/math_00.cpp)
set(COORDINATES_00_SOURCES
src/prototypes/coordinates_00.cpp
src/coordinates/coordinates.h
src/coordinates/coordinate_transformer.h
src/coordinates/coordinate_transformer.cpp
src/coordinates/translated_coordinates.h
src/coordinates/translated_coordinates.cpp)
set(MINIMAP_00_SOURCES
src/prototypes/minimap_00.cpp)
# Add an executable target
add_executable(Holesome ${SOURCES})
add_executable(Physics_00 ${PHYSICS_00_SOURCES})
add_executable(Math_00 ${MATH_00_SOURCES})
add_executable(Coordinates_00 ${COORDINATES_00_SOURCES})
add_executable(Minimap_00 ${MINIMAP_00_SOURCES})
# Link SFML and other libraries to your executable target
target_link_libraries(Holesome sfml-graphics sfml-audio)
target_link_libraries(Holesome Eigen3::Eigen)
target_link_libraries(Holesome box2d::box2d)
target_link_libraries(Physics_00 box2d::box2d)
target_link_libraries(Math_00 Eigen3::Eigen)
target_link_libraries(Coordinates_00 Eigen3::Eigen)
target_link_libraries(Minimap_00 sfml-graphics sfml-audio)
# Assets
add_custom_target(copy_assets
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_LIST_DIR}/assets ${CMAKE_CURRENT_BINARY_DIR}/assets
)
add_dependencies(Holesome copy_assets)