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)
- find_package(Vulkan REQUIRED)
- if(NOT Vulkan_FOUND)
- message(FATAL_ERROR "Vulkan not found")
- endif()
- # Create the executable
- add_executable (${EXECUTABLE_NAME} src/Main.cpp)
- # Add sources
- target_sources(${EXECUTABLE_NAME} PUBLIC
- src/EngineConfig.h
- src/vulkan.hpp
- )
- # Link libraries so that they can be used in the project
- target_link_libraries(${EXECUTABLE_NAME}
- PRIVATE Vulkan::Vulkan
- )
- # Copy assets
- file(COPY ${CMAKE_SOURCE_DIR}/Assets DESTINATION ${CMAKE_BINARY_DIR})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement