blob: 047c99515bbd7cc6ac63ec99212472c93f881147 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# Copyright 2017 Edward O'Callaghan <funfunctor@folklore1984.net>
#cmake_minimum_required(VERSION 3.7.2)
cmake_minimum_required(VERSION 3.6.2)
project(learning_vk)
SET(RELEASE_VERSION \"${MAJOR_VERSION}.${MINOR_VERSION}\")
execute_process(COMMAND git describe --abbrev=12 --always
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE GIT_REV
)
add_definitions(-DUMR_BUILD_VER=${RELEASE_VERSION})
add_definitions(-DUMR_BUILD_REV=\"${GIT_REV}\")
# Add local repository for FindXXX.cmake modules.
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/" ${CMAKE_MODULE_PATH})
find_package(Vulkan REQUIRED)
include_directories(${Vulkan_INCLUDE_DIRS})
find_package(GLFW REQUIRED)
include_directories(${GLFW_INCLUDE_DIR})
set(REQUIRED_EXTERNAL_LIBS
${Vulkan_LIBRARIES}
${GLFW_LIBRARIES}
)
# Global setting: build everything position independent
#set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W -O2 -g3")
add_subdirectory(src)
|