This repository has been archived by the owner on Oct 27, 2023. It is now read-only.
forked from WatIsDeze/Polyhedron-Engine
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
563de03
commit 9ae17fb
Showing
207 changed files
with
27,112 additions
and
10,232 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
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,10 @@ | ||
[submodule "extern/zlib"] | ||
path = extern/zlib | ||
url = https://github.com/madler/zlib.git | ||
ignore = dirty | ||
[submodule "extern/curl"] | ||
path = extern/curl | ||
url = https://github.com/curl/curl.git | ||
[submodule "extern/SDL2"] | ||
path = extern/SDL2 | ||
url = https://github.com/spurious/SDL-mirror.git |
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 |
---|---|---|
@@ -1,64 +1,85 @@ | ||
cmake_minimum_required (VERSION 3.8) | ||
|
||
include("cmake/HunterGate.cmake") | ||
# ---------- Startup hunter ------------------------- | ||
HunterGate( | ||
URL "https://github.com/ruslo/hunter/archive/v0.20.7.tar.gz" | ||
SHA1 "a376088a679fbfbe3a2c330746801f1d47e51a37" | ||
) | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") | ||
|
||
project(quake2-RTX) | ||
set(Q2RTX_VERSION_MAJOR 1) | ||
set(Q2RTX_VERSION_MINOR 0) | ||
set(Q2RTX_VERSION_POINT 0) | ||
|
||
PROJECT(quake2-pt) | ||
# get short-hash | ||
execute_process( | ||
COMMAND git rev-parse --short HEAD | ||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | ||
OUTPUT_VARIABLE Q2RTX_VERSION_SHA | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
|
||
OPTION(CONFIG_GL_RENDERER "Enable GL renderer") | ||
OPTION(CONFIG_GL_RENDERER "Enable GL renderer" ON) | ||
OPTION(CONFIG_VKPT_RENDERER "Enable VKPT renderer" ON) | ||
OPTION(CONFIG_USE_OPTIX "Use optix for tracing rays") | ||
SET(CONFIG_OPTIX_DIR "" CACHE PATH "Optix SDK directory") | ||
OPTION(CONFIG_VKPT_ENABLE_DEVICE_GROUPS "Enable device groups (multi-gpu) support" ON) | ||
OPTION(CONFIG_VKPT_ENABLE_IMAGE_DUMPS "Enable image dumping functionality" OFF) | ||
OPTION(CONFIG_USE_CURL "Use CURL for HTTP support" ON) | ||
OPTION(CONFIG_LINUX_PACKAGING_SUPPORT "Enable Linux Packaging support" OFF) | ||
OPTION(CONFIG_LINUX_STEAM_RUNTIME_SUPPORT "Enable Linux Steam Runtime support" OFF) | ||
set_property(GLOBAL PROPERTY USE_FOLDERS ON) | ||
|
||
# ---------- Setup output Directories ------------------------- | ||
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY | ||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY | ||
${PROJECT_BINARY_DIR}/Bin | ||
CACHE PATH | ||
"Single Directory for all Libraries" | ||
) | ||
|
||
# --------- Setup the Executable output Directory ------------- | ||
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY | ||
${PROJECT_BINARY_DIR}/Bin | ||
CACHE PATH | ||
"Single Directory for all Executables." | ||
) | ||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Bin CACHE PATH "Single Directory for all Executables.") | ||
|
||
# --------- Dependencies ------------------------------------- | ||
if (CMAKE_SIZEOF_VOID_P EQUAL 8) | ||
set( IS_64_BIT 1 ) | ||
else () | ||
endif () | ||
|
||
# --------- Dependencies ------------------------------------- | ||
hunter_add_package(zlib) | ||
hunter_add_package(png) | ||
hunter_add_package(jpeg) | ||
hunter_add_package(sdl2) | ||
#hunter_add_package(curl) | ||
|
||
find_package(ZLIB CONFIG REQUIRED) | ||
find_package(PNG CONFIG REQUIRED) | ||
find_package(JPEG CONFIG REQUIRED) | ||
find_package(SDL2 CONFIG REQUIRED) | ||
#find_package(Vulkan) | ||
#find_library(Vulkan_LIBRARY NAMES vulkan-1 vulkan PATHS "C:/VulkanSDK/1.1.85.0") | ||
IF(WIN32) | ||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd") | ||
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELEASE} /MT") | ||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT") | ||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /MT") | ||
ENDIF() | ||
|
||
add_subdirectory(extern) | ||
|
||
link_directories(.) | ||
|
||
# Compatibility mode | ||
find_package(ZLIB REQUIRED) | ||
string(COMPARE EQUAL "${ZLIB_INCLUDE_DIRS}" "" is_empty) | ||
if(is_empty) | ||
message(FATAL_ERROR "Expected non-empty") | ||
endif() | ||
set(CMAKE_INSTALL_PREFIX ${PROJECT_BINARY_DIR}/install) | ||
|
||
add_subdirectory(src) | ||
|
||
IF(CONFIG_LINUX_PACKAGING_SUPPORT) | ||
# https://cmake.org/cmake/help/v3.8/module/CPackDeb.html | ||
set(CPACK_GENERATOR "DEB") | ||
set(CPACK_PACKAGE_NAME "quake2rtx") | ||
set(CPACK_PACKAGE_VENDOR "NVIDIA Corporation") | ||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "RTX Remaster of Quake 2") | ||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/license.txt") | ||
set(CPACK_PACKAGE_VERSION_MAJOR ${Q2RTX_VERSION_MAJOR}) | ||
set(CPACK_PACKAGE_VERSION_MINOR ${Q2RTX_VERSION_MINOR}) | ||
set(CPACK_PACKAGE_VERSION_PATCH ${Q2RTX_VERSION_POINT}) | ||
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") | ||
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") | ||
set(CPACK_DEBIAN_PACKAGE_SECTION "games") | ||
|
||
set(CPACK_PACKAGE_CONTACT "http://nvidia.com/object/support.html") | ||
|
||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://www.nvidia.com/en-us/geforce/news/quake-ii-rtx-ray-tracing-vulkan-vkray-geforce-rtx/") | ||
|
||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libopenal1, libvulkan1") | ||
|
||
SET(CMAKE_INSTALL_PREFIX ${PROJECT_BINARY_DIR}/install) | ||
set(CPACK_DEB_PACKAGE_COMPONENT ON) | ||
set(CPACK_DEB_COMPONENT_INSTALL ON) | ||
set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS ON) | ||
|
||
# Mark as shareware to be clear this is demo levels + RTX | ||
set(CPACK_COMPONENTS_ALL shareware) | ||
|
||
ADD_SUBDIRECTORY(src) | ||
include(CPack) | ||
ENDIF() |
Oops, something went wrong.