Advertisement
Guest User

Untitled

a guest
Mar 8th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 0.99 KB | None | 0 0
  1. cmake_minimum_required (VERSION 3.7)
  2. project (Lance)
  3.  
  4. message("Using CMake version ${CMAKE_VERSION}")
  5. message("Processing CMakeLists.txt")
  6.  
  7. # Program variables
  8. set (Build_VERSION_MAJOR 0)
  9. set (Build_VERSION_MINOR 0)
  10. set (Build_VERSION_TWEAK 0)
  11.  
  12. # Configure a header file to pass some of the CMake settings
  13. # to the source code
  14. configure_file (
  15.   "${PROJECT_SOURCE_DIR}/src/EngineConfig.h.in"
  16.   "${PROJECT_SOURCE_DIR}/src/EngineConfig.h"
  17. )
  18.  
  19. # Compiler version
  20. set (CMAKE_CXX_STANDARD 17)
  21.  
  22. find_package(Vulkan REQUIRED)
  23. if(NOT Vulkan_FOUND)
  24.   message(FATAL_ERROR "Vulkan not found")
  25. endif()
  26.  
  27. # Create the executable
  28. add_executable (${EXECUTABLE_NAME} src/Main.cpp)
  29.  
  30. # Add sources
  31. target_sources(${EXECUTABLE_NAME} PUBLIC
  32.   src/EngineConfig.h
  33.   src/vulkan.hpp
  34. )
  35.  
  36. # Link libraries so that they can be used in the project
  37. target_link_libraries(${EXECUTABLE_NAME}
  38.   PRIVATE Vulkan::Vulkan
  39. )
  40.  
  41. # Copy assets
  42. file(COPY ${CMAKE_SOURCE_DIR}/Assets DESTINATION ${CMAKE_BINARY_DIR})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement