cmake: Reformat

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2019-10-13 05:42:54 +02:00
parent e02225262c
commit 2ba8e9a994

View file

@ -20,14 +20,14 @@ CMake_Minimum_Required(VERSION 3.8.0)
Include("cmake/util.cmake") Include("cmake/util.cmake")
# Automatic Versioning # Automatic Versioning
Set(VERSION_MAJOR 0) set(VERSION_MAJOR 0)
Set(VERSION_MINOR 7) set(VERSION_MINOR 7)
Set(VERSION_PATCH 1) set(VERSION_PATCH 1)
Set(VERSION_TWEAK 0) set(VERSION_TWEAK 0)
Set(PROJECT_COMMIT "N/A") set(PROJECT_COMMIT "N/A")
If(EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git") if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git")
Set(GIT_RESULT "") set(GIT_RESULT "")
Set(GIT_OUTPUT "") set(GIT_OUTPUT "")
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND git rev-list --count --topo-order ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}..HEAD COMMAND git rev-list --count --topo-order ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}..HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
@ -35,9 +35,9 @@ If(EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git")
OUTPUT_VARIABLE GIT_OUTPUT OUTPUT_VARIABLE GIT_OUTPUT
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE ERROR_QUIET
) )
If(GIT_RESULT EQUAL 0) if(GIT_RESULT EQUAL 0)
Set(VERSION_TWEAK ${GIT_OUTPUT}) set(VERSION_TWEAK ${GIT_OUTPUT})
EndIf() endif()
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND git rev-parse HEAD COMMAND git rev-parse HEAD
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
@ -45,10 +45,10 @@ If(EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git")
OUTPUT_VARIABLE GIT_OUTPUT OUTPUT_VARIABLE GIT_OUTPUT
OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE ERROR_QUIET
) )
If(GIT_RESULT EQUAL 0) if(GIT_RESULT EQUAL 0)
Set(PROJECT_COMMIT ${GIT_OUTPUT}) set(PROJECT_COMMIT ${GIT_OUTPUT})
EndIf() endif()
EndIf() endif()
# Define Project # Define Project
PROJECT( PROJECT(
@ -113,8 +113,8 @@ endif()
# C++ Standard and Extensions # C++ Standard and Extensions
## Use C++17 and no non-standard extensions. ## Use C++17 and no non-standard extensions.
SET(_CXX_STANDARD 17) set(_CXX_STANDARD 17)
SET(_CXX_EXTENSIONS OFF) set(_CXX_EXTENSIONS OFF)
################################################################################ ################################################################################
# CMake / Compiler # CMake / Compiler
@ -133,7 +133,7 @@ configure_file(
# Windows # Windows
if(WIN32) if(WIN32)
## Installer (InnoSetup) ## Installer (InnoSetup)
Configure_File( configure_file(
"${PROJECT_SOURCE_DIR}/cmake/installer.iss.in" "${PROJECT_SOURCE_DIR}/cmake/installer.iss.in"
"${PROJECT_BINARY_DIR}/installer.iss" "${PROJECT_BINARY_DIR}/installer.iss"
) )
@ -223,10 +223,10 @@ endif()
################################################################################ ################################################################################
# Code # Code
################################################################################ ################################################################################
SET(PROJECT_DATA_LOCALE set(PROJECT_DATA_LOCALE
"${PROJECT_SOURCE_DIR}/data/locale/en-US.ini" "${PROJECT_SOURCE_DIR}/data/locale/en-US.ini"
) )
SET(PROJECT_DATA_EFFECTS set(PROJECT_DATA_EFFECTS
"${PROJECT_SOURCE_DIR}/data/effects/channel-mask.effect" "${PROJECT_SOURCE_DIR}/data/effects/channel-mask.effect"
"${PROJECT_SOURCE_DIR}/data/effects/color-conversion.effect" "${PROJECT_SOURCE_DIR}/data/effects/color-conversion.effect"
"${PROJECT_SOURCE_DIR}/data/effects/color-grade.effect" "${PROJECT_SOURCE_DIR}/data/effects/color-grade.effect"
@ -245,20 +245,20 @@ SET(PROJECT_DATA_EFFECTS
"${PROJECT_SOURCE_DIR}/data/effects/sdf/sdf-producer.effect" "${PROJECT_SOURCE_DIR}/data/effects/sdf/sdf-producer.effect"
"${PROJECT_SOURCE_DIR}/data/effects/sdf/sdf-consumer.effect" "${PROJECT_SOURCE_DIR}/data/effects/sdf/sdf-consumer.effect"
) )
SET(PROJECT_DATA_SHADERS set(PROJECT_DATA_SHADERS
# "${PROJECT_SOURCE_DIR}/data/shaders/name.effect" # "${PROJECT_SOURCE_DIR}/data/shaders/name.effect"
"${PROJECT_SOURCE_DIR}/data/shaders/filter/example.effect" "${PROJECT_SOURCE_DIR}/data/shaders/filter/example.effect"
) )
SET(PROJECT_DATA set(PROJECT_DATA
${PROJECT_DATA_LOCALE} ${PROJECT_DATA_LOCALE}
${PROJECT_DATA_EFFECTS} ${PROJECT_DATA_EFFECTS}
${PROJECT_DATA_SHADERS} ${PROJECT_DATA_SHADERS}
) )
SET(PROJECT_LIBRARIES set(PROJECT_LIBRARIES
) )
SET(PROJECT_TEMPLATES set(PROJECT_TEMPLATES
"${PROJECT_SOURCE_DIR}/cmake/version.hpp.in" "${PROJECT_SOURCE_DIR}/cmake/version.hpp.in"
"${PROJECT_SOURCE_DIR}/cmake/module.cpp.in" "${PROJECT_SOURCE_DIR}/cmake/module.cpp.in"
) )
@ -269,13 +269,13 @@ if(WIN32)
) )
endif() endif()
SET(PROJECT_PUBLIC set(PROJECT_PUBLIC
) )
SET(PROJECT_PRIVATE_GENERATED set(PROJECT_PRIVATE_GENERATED
"${PROJECT_BINARY_DIR}/source/module.cpp" "${PROJECT_BINARY_DIR}/source/module.cpp"
"${PROJECT_BINARY_DIR}/source/version.hpp" "${PROJECT_BINARY_DIR}/source/version.hpp"
) )
SET(PROJECT_PRIVATE_SOURCE set(PROJECT_PRIVATE_SOURCE
# Plugin # Plugin
"${PROJECT_SOURCE_DIR}/source/plugin.hpp" "${PROJECT_SOURCE_DIR}/source/plugin.hpp"
@ -289,8 +289,6 @@ SET(PROJECT_PRIVATE_SOURCE
"${PROJECT_SOURCE_DIR}/source/util-math.cpp" "${PROJECT_SOURCE_DIR}/source/util-math.cpp"
"${PROJECT_SOURCE_DIR}/source/util-memory.hpp" "${PROJECT_SOURCE_DIR}/source/util-memory.hpp"
"${PROJECT_SOURCE_DIR}/source/util-memory.cpp" "${PROJECT_SOURCE_DIR}/source/util-memory.cpp"
"${PROJECT_SOURCE_DIR}/source/utility/utility-event.hpp"
"${PROJECT_SOURCE_DIR}/source/utility/utility-event.cpp"
# Graphics # Graphics
"${PROJECT_SOURCE_DIR}/source/gfx/gfx-effect-source.hpp" "${PROJECT_SOURCE_DIR}/source/gfx/gfx-effect-source.hpp"
@ -366,6 +364,7 @@ set(PROJECT_PRIVATE
${PROJECT_DATA} ${PROJECT_DATA}
${PROJECT_PRIVATE_GENERATED} ${PROJECT_PRIVATE_GENERATED}
${PROJECT_PRIVATE_SOURCE} ${PROJECT_PRIVATE_SOURCE}
${PROJECT_TEMPLATES}
) )
source_group(TREE "${PROJECT_SOURCE_DIR}/data" PREFIX "Data Files" FILES ${PROJECT_DATA}) source_group(TREE "${PROJECT_SOURCE_DIR}/data" PREFIX "Data Files" FILES ${PROJECT_DATA})