Skip to content
Commit f3bc815c authored by Mike Weiblen's avatar Mike Weiblen
Browse files

build: CMakeLists.txt cleanup, part 1

This is a first pass reorganization of CMake files in this repo.
It consists primarily of dead code/variable removal, simplification,
and reformatting by latest cmake-format.

bump to cmake_minimum_required(3.4) for ccache

simplify excessive use of generator expressions

clarify why CMAKE_OSX_DEPLOYMENT_TARGET is pre-project().

clarify setting Windows install prefix if needed

remove unused DisplayServer variable

remove obsolete argument to endif()

remove unneeded ccache property RULE_LAUNCH_LINK

ccache doesn't affect linking, so the property is meaningless.

remove unneeded CMAKE_VERBOSE_MAKEFILE hardcode.

remove extra CMAKE_MODULE_PATH

remove extra cmake_minimum_required

change PYTHON_CMD to PYTHON_EXECUTABLE

change CMAKE_SYSTEM_NAME to UNIX/APPLE/WIN32
    Use consistent platform identification.
    Note that UNIX evaluates true for OSX, so whenever the code intends
    "Linux only", we use (UNIX AND NOT APPLE).

remove unneeded TARGET_NAMES variable

remove unneeded VK_LAYER_RPATH variable

change 'ln -sf' to 'cmake -E create_symlink'

reorder dependencies for clarity

rearrange order of macro arguments

rename run_vk_xml_generate to GenerateFromVkXml
rename add_vk_layer to AddVkLayer
    Borrowing from the Google style guide, use camel-case
    to more easily identify locally-defined macros/functions.

remove unneeded WRAP_SRCS variable

remove unneeded TEST_SRCS variable

move check of VulkanRegistry_FOUND

move SCRIPTS_DIR closer to point of use

move include(FindPkgConfig) earlier

move CMAKE_MACOSX_RPATH earlier

move option() eariler

move GenerateFromVkXml invocations earlier

Move invocations to be closer to the definition of the macro.
Minor edits to comments.

move API_NAME earlier

remove unused BUILDTGT_DIR variable

move add_executable() earlier

combine if(WIN32) trees

.cmake-format.py 0.4.1

reformat using cmake-format 0.4.1

Change-Id: Ia251e932dbc9a8f2655201bb12248dea8c940c30
parent 6908e874
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment