-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hannah Bollar
committed
Oct 2, 2019
0 parents
commit ea8fb96
Showing
1,626 changed files
with
394,664 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
cmake_minimum_required(VERSION 2.8.12) | ||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") | ||
|
||
project(cis565_project4_vulkan_grass_rendering) | ||
|
||
OPTION(USE_D2D_WSI "Build the project using Direct to Display swapchain" OFF) | ||
|
||
find_package(Vulkan REQUIRED) | ||
|
||
IF(WIN32) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_USE_PLATFORM_WIN32_KHR") | ||
ELSE(WIN32) | ||
find_package(Threads REQUIRED) | ||
IF(USE_D2D_WSI) | ||
MESSAGE("Using direct to display extension...") | ||
add_definitions(-D_DIRECT2DISPLAY) | ||
ELSE(USE_D2D_WSI) | ||
find_package(XCB REQUIRED) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_USE_PLATFORM_XCB_KHR") | ||
ENDIF(USE_D2D_WSI) | ||
# Todo : android? | ||
ENDIF(WIN32) | ||
|
||
# Set preprocessor defines | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNOMINMAX -D_USE_MATH_DEFINES") | ||
|
||
add_definitions(-D_CRT_SECURE_NO_WARNINGS) | ||
add_definitions(-std=c++11) | ||
|
||
# Enable the creation of folders for Visual Studio projects | ||
set_property(GLOBAL PROPERTY USE_FOLDERS ON) | ||
|
||
function(ExternalTarget folder target) | ||
set_property(TARGET ${target} PROPERTY FOLDER ${folder}) | ||
endfunction(ExternalTarget) | ||
|
||
function(InternalTarget folder target) | ||
ExternalTarget("${folder}" ${target}) | ||
if (MSVC) | ||
get_target_property(targetSources ${target} SOURCES) | ||
foreach(sourceFile IN ITEMS ${targetSources}) | ||
if (IS_ABSOLUTE "${sourceFile}") | ||
file(RELATIVE_PATH sourceFile "${CMAKE_CURRENT_SOURCE_DIR}" "${sourceFile}") | ||
endif() | ||
get_filename_component(sourceDir "${sourceFile}" PATH) | ||
string(REPLACE "/" "\\" sourceDir "${sourceDir}") | ||
source_group("${sourceDir}" FILES "${sourceFile}") | ||
endforeach() | ||
endif() | ||
endfunction(InternalTarget) | ||
|
||
# Compiler specific stuff | ||
IF(MSVC) | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") | ||
ENDIF(MSVC) | ||
|
||
IF(WIN32) | ||
# Nothing here (yet) | ||
ELSE(WIN32) | ||
link_libraries(${XCB_LIBRARIES} ${VULKAN_LIB}) | ||
ENDIF(WIN32) | ||
|
||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin/") | ||
|
||
add_subdirectory(external) | ||
add_subdirectory(src) |
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying | ||
# file Copyright.txt or https://cmake.org/licensing for details. | ||
|
||
#.rst: | ||
# FindVulkan | ||
# ---------- | ||
# | ||
# Try to find Vulkan | ||
# | ||
# IMPORTED Targets | ||
# ^^^^^^^^^^^^^^^^ | ||
# | ||
# This module defines :prop_tgt:`IMPORTED` target ``Vulkan::Vulkan``, if | ||
# Vulkan has been found. | ||
# | ||
# Result Variables | ||
# ^^^^^^^^^^^^^^^^ | ||
# | ||
# This module defines the following variables:: | ||
# | ||
# Vulkan_FOUND - True if Vulkan was found | ||
# Vulkan_INCLUDE_DIRS - include directories for Vulkan | ||
# Vulkan_LIBRARIES - link against this library to use Vulkan | ||
# | ||
# The module will also define two cache variables:: | ||
# | ||
# Vulkan_INCLUDE_DIR - the Vulkan include directory | ||
# Vulkan_LIBRARY - the path to the Vulkan library | ||
# | ||
|
||
if(WIN32) | ||
find_path(Vulkan_INCLUDE_DIR | ||
NAMES vulkan/vulkan.h | ||
PATHS | ||
"$ENV{VULKAN_SDK}/Include" | ||
) | ||
|
||
if(CMAKE_SIZEOF_VOID_P EQUAL 8) | ||
find_library(Vulkan_LIBRARY | ||
NAMES vulkan-1 | ||
PATHS | ||
"$ENV{VULKAN_SDK}/Lib" | ||
"$ENV{VULKAN_SDK}/Bin" | ||
) | ||
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) | ||
find_library(Vulkan_LIBRARY | ||
NAMES vulkan-1 | ||
PATHS | ||
"$ENV{VULKAN_SDK}/Lib32" | ||
"$ENV{VULKAN_SDK}/Bin32" | ||
NO_SYSTEM_ENVIRONMENT_PATH | ||
) | ||
endif() | ||
else() | ||
find_path(Vulkan_INCLUDE_DIR | ||
NAMES vulkan/vulkan.h | ||
PATHS | ||
"$ENV{VULKAN_SDK}/include") | ||
find_library(Vulkan_LIBRARY | ||
NAMES vulkan | ||
PATHS | ||
"$ENV{VULKAN_SDK}/lib") | ||
endif() | ||
|
||
set(Vulkan_LIBRARIES ${Vulkan_LIBRARY}) | ||
set(Vulkan_INCLUDE_DIRS ${Vulkan_INCLUDE_DIR}) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(Vulkan | ||
DEFAULT_MSG | ||
Vulkan_LIBRARY Vulkan_INCLUDE_DIR) | ||
|
||
mark_as_advanced(Vulkan_INCLUDE_DIR Vulkan_LIBRARY) | ||
|
||
if(Vulkan_FOUND AND NOT TARGET Vulkan::Vulkan) | ||
add_library(Vulkan::Vulkan UNKNOWN IMPORTED) | ||
set_target_properties(Vulkan::Vulkan PROPERTIES | ||
IMPORTED_LOCATION "${Vulkan_LIBRARIES}" | ||
INTERFACE_INCLUDE_DIRECTORIES "${Vulkan_INCLUDE_DIRS}") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# - FindXCB | ||
# | ||
# Copyright 2015 Valve Coporation | ||
|
||
find_package(PkgConfig) | ||
|
||
if(NOT XCB_FIND_COMPONENTS) | ||
set(XCB_FIND_COMPONENTS xcb) | ||
endif() | ||
|
||
include(FindPackageHandleStandardArgs) | ||
set(XCB_FOUND true) | ||
set(XCB_INCLUDE_DIRS "") | ||
set(XCB_LIBRARIES "") | ||
foreach(comp ${XCB_FIND_COMPONENTS}) | ||
# component name | ||
string(TOUPPER ${comp} compname) | ||
string(REPLACE "-" "_" compname ${compname}) | ||
# header name | ||
string(REPLACE "xcb-" "" headername xcb/${comp}.h) | ||
# library name | ||
set(libname ${comp}) | ||
|
||
pkg_check_modules(PC_${comp} QUIET ${comp}) | ||
|
||
find_path(${compname}_INCLUDE_DIR NAMES ${headername} | ||
HINTS | ||
${PC_${comp}_INCLUDEDIR} | ||
${PC_${comp}_INCLUDE_DIRS} | ||
) | ||
|
||
find_library(${compname}_LIBRARY NAMES ${libname} | ||
HINTS | ||
${PC_${comp}_LIBDIR} | ||
${PC_${comp}_LIBRARY_DIRS} | ||
) | ||
|
||
find_package_handle_standard_args(${comp} | ||
FOUND_VAR ${comp}_FOUND | ||
REQUIRED_VARS ${compname}_INCLUDE_DIR ${compname}_LIBRARY) | ||
mark_as_advanced(${compname}_INCLUDE_DIR ${compname}_LIBRARY) | ||
|
||
list(APPEND XCB_INCLUDE_DIRS ${${compname}_INCLUDE_DIR}) | ||
list(APPEND XCB_LIBRARIES ${${compname}_LIBRARY}) | ||
|
||
if(NOT ${comp}_FOUND) | ||
set(XCB_FOUND false) | ||
endif() | ||
endforeach() | ||
|
||
list(REMOVE_DUPLICATES XCB_INCLUDE_DIRS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "Build the GLFW example programs") | ||
set(GLFW_BUILD_TESTS OFF CACHE BOOL "Build the GLFW test programs") | ||
set(GLFW_BUILD_DOCS OFF CACHE BOOL "Build the GLFW documentation") | ||
set(GLFW_INSTALL OFF CACHE BOOL "Generate installation target") | ||
add_subdirectory(GLFW) | ||
|
||
set(GLM_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/glm PARENT_SCOPE) | ||
set(STB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/stb PARENT_SCOPE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
branches: | ||
only: | ||
- ci | ||
- master | ||
skip_tags: true | ||
environment: | ||
CFLAGS: /WX | ||
matrix: | ||
- BUILD_SHARED_LIBS: ON | ||
- BUILD_SHARED_LIBS: OFF | ||
matrix: | ||
fast_finish: true | ||
build_script: | ||
- mkdir build | ||
- cd build | ||
- cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_SHARED_LIBS=%BUILD_SHARED_LIBS% .. | ||
- cmake --build . | ||
notifications: | ||
- provider: Email | ||
to: | ||
- [email protected] | ||
on_build_failure: true | ||
on_build_success: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.m linguist-language=Objective-C |
Oops, something went wrong.