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
6 files changed
tree: 2fccf45758fd844f2c35d2e4fb917c2c261c108e
  1. cmake/
  2. external/
  3. loader/
  4. scripts/
  5. tests/
  6. .appveyor.yml
  7. .clang-format
  8. .cmake-format.py
  9. .gitattributes
  10. .gitignore
  11. .travis.yml
  12. BUILD.md
  13. CMakeLists.txt
  14. CONTRIBUTING.md
  15. COPYRIGHT.txt
  16. GOVERNANCE.md
  17. LICENSE.txt
  18. README.md
README.md

Vulkan Ecosystem Components

This project provides the Khronos official Vulkan ICD desktop loader for Windows, Linux, and MacOS.

CI Build Status

PlatformBuild Status
Linux/MacOSBuild Status
WindowsBuild status

Introduction

Vulkan is an explicit API, enabling direct control over how GPUs actually work. As such, Vulkan supports systems that have multiple GPUs, each running with a different driver, or ICD (Installable Client Driver). Vulkan also supports multiple global contexts (instances, in Vulkan terminology). The ICD loader is a library that is placed between a Vulkan application and any number of Vulkan drivers, in order to support multiple drivers and the instance-level functionality that works across these drivers. Additionally, the loader manages inserting Vulkan layer libraries, such as validation layers, between an application and the drivers.

This repository contains the Vulkan loader that is used for Linux, Windows, MacOS, and iOS. There is also a separate loader, maintained by Google, which is used on Android.

The following components are available in this repository:

Contact Information

Information for Developing or Contributing

Please see the CONTRIBUTING.md file in this repository for more details. Please see the GOVERNANCE.md file in this repository for repository management details.

How to Build and Run

BUILD.md Includes directions for building all components.

Architecture and interface information for the loader is in loader/LoaderAndLayerInterface.md.

License

This work is released as open source under a Apache-style license from Khronos including a Khronos copyright.

See COPYRIGHT.txt for a full list of licenses used in this repository.

Acknowledgements

While this project has been developed primarily by LunarG, Inc., there are many other companies and individuals making this possible: Valve Corporation, funding project development; Khronos providing oversight and hosting of the project.