summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward O'Callaghan <funfunctor@folklore1984.net>2017-02-06 22:29:55 +1100
committerEdward O'Callaghan <funfunctor@folklore1984.net>2017-02-06 22:29:55 +1100
commitbec7c7a073debdf47cc6bb0fbb42227aea96735e (patch)
tree6bcf593634c3abf4c90a8b77f7ca23d90c09d39c
initial
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
-rw-r--r--.gitignore1
-rw-r--r--CMakeLists.txt32
-rw-r--r--src/CMakeLists.txt15
-rw-r--r--src/main.cpp35
4 files changed, 83 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..567609b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+build/
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..254d4f2
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Copyright 2017 Edward O'Callaghan <funfunctor@folklore1984.net>
+
+cmake_minimum_required(VERSION 3.0.1)
+
+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(Curses REQUIRED)
+#include_directories(${CURSES_INCLUDE_DIRS})
+
+#set(REQUIRED_EXTERNAL_LIBS
+# ${CURSES_LIBRARIES}
+# ${PCIACCESS_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)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..743404c
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,15 @@
+# Copyright 2017 Edward O'Callaghan <funfunctor@folklore1984.net>
+
+project(main)
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/)
+
+#application objects
+#add_library(umrapp
+# foo.cpp
+#)
+
+add_executable(${PROJECT_NAME} main.cpp)
+#target_link_libraries(umr umrapp)
+
+install(TARGETS ${PROJECT_NAME} DESTINATION bin)
diff --git a/src/main.cpp b/src/main.cpp
new file mode 100644
index 0000000..43416ee
--- /dev/null
+++ b/src/main.cpp
@@ -0,0 +1,35 @@
+#include <vulkan/vulkan.h>
+
+#include <iostream>
+#include <stdexcept>
+#include <functional>
+
+class HelloTriangleApplication {
+public:
+ void run() {
+ initVulkan();
+ mainLoop();
+ }
+
+private:
+ void initVulkan() {
+
+ }
+
+ void mainLoop() {
+
+ }
+};
+
+int main() {
+ HelloTriangleApplication app;
+
+ try {
+ app.run();
+ } catch (const std::runtime_error& e) {
+ std::cerr << e.what() << std::endl;
+ return EXIT_FAILURE;
+ }
+
+ return EXIT_SUCCESS;
+}