Advertisement
Guest User

Untitled

a guest
Mar 8th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 1.03 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. # Define sources and library
  23. set (EXECUTABLE_NAME "Lance")
  24. file(GLOB_RECURSE EXE_SOURCES
  25.   "${CMAKE_CURRENT_SOURCE_DIR}/src/*.h"
  26.   "${CMAKE_CURRENT_SOURCE_DIR}/src/*.hpp"
  27.   "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp"
  28. )
  29.  
  30. # Create the executable
  31. add_executable (${EXECUTABLE_NAME} ${EXE_SOURCES})
  32.  
  33. # Link libraries so that they can be used in the project
  34. find_package(Vulkan REQUIRED)
  35. target_link_libraries(${EXECUTABLE_NAME}
  36.   Vulkan::Vulkan
  37. )
  38.  
  39. # Copy assets
  40. file(COPY ${CMAKE_SOURCE_DIR}/Assets DESTINATION ${CMAKE_BINARY_DIR})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement