Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmake_minimum_required (VERSION 3.7)
- project (Lance)
- message("Using CMake version ${CMAKE_VERSION}")
- message("Processing CMakeLists.txt")
- # Program variables
- set (Build_VERSION_MAJOR 0)
- set (Build_VERSION_MINOR 0)
- set (Build_VERSION_TWEAK 0)
- # Configure a header file to pass some of the CMake settings
- # to the source code
- configure_file (
- "${PROJECT_SOURCE_DIR}/src/EngineConfig.h.in"
- "${PROJECT_SOURCE_DIR}/src/EngineConfig.h"
- )
- # Compiler version
- set (CMAKE_CXX_STANDARD 17)
- # Define sources and library
- set (EXECUTABLE_NAME "Lance")
- file(GLOB_RECURSE EXE_SOURCES
- "${CMAKE_CURRENT_SOURCE_DIR}/src/*.h"
- "${CMAKE_CURRENT_SOURCE_DIR}/src/*.hpp"
- "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp"
- )
- # Create the executable
- add_executable (${EXECUTABLE_NAME} ${EXE_SOURCES})
- # Link libraries so that they can be used in the project
- find_package(Vulkan REQUIRED)
- target_link_libraries(${EXECUTABLE_NAME}
- Vulkan::Vulkan
- )
- # Copy assets
- file(COPY ${CMAKE_SOURCE_DIR}/Assets DESTINATION ${CMAKE_BINARY_DIR})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement