Commit Graph

11 Commits

Author SHA1 Message Date
Charles Giessen 6198554011 tests: Add CMake to handle Detours library
The Detours library uses a make file to build it. Thus it needed
to be translated into CMake equivalent code to make a useable target.

Change-Id: Ibed33c962e522f44297c7fa9cbe3f62964503ceb
2021-05-27 16:59:28 -06:00
Lenny Komow 3bab7e6512 build: Find headers package from external dir
A previous change allowed finding vulkan headers in the external
directory. This change modifies that to use the find_package()
interface through CMake. This allows versioning to work properly.

Change-Id: Ic00c45545d343286dce5c1ea4108e186d2bb6268
2020-04-10 14:05:21 -06:00
dan sinclair 0d168456e4 Allow Vulkan-Headers to be in externals.
This CL updates the CMake files to allow Vulkan-Headers to be in the
external folder. If the externals/Vulkan-Headers folder is present the
scripts will use that version of the headers.
2020-02-20 09:49:24 -07:00
Mike Weiblen f3bc815c74 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
2018-09-20 12:12:14 -06:00
Mike Weiblen c781cff2bc build: Beautify cmake files
Add .cmake-format.py
Add cmake-format docs to CONTRIBUTING.md
Minor edits to existing files

Due to a bug in cmake-format, use this script to reformat:

for i in CMakeLists.txt external/CMakeLists.txt loader/CMakeLists.txt tests/CMakeLists.txt tests/layers/CMakeLists.txt
do
    sed --in-place='' 's/^  *#/#/' $i
    cmake-format --in-place $i
done

Change-Id: I8e59c77ae184c88485a97a015ac81d4f71ac4897
2018-06-30 22:55:12 -06:00
Mike Weiblen 2f44988b7a build: Insert copyright in cmake files 2018-06-27 11:36:05 -06:00
Karl Schultz 9e6a609591 build: Improve googletest handling
Behavior is largely unchanged except that specifying BUILD_TESTS=ON
with googletest not present no longer quietly skips building the tests.

- Make inclusion of external directory unconditional.  We may someday
  put something there is not related to testing.
- Make default for BUILD_TEST dependent on googletest presence.
- Remove if() around entire contents of tests CMake file.
- Add CMake messaging to clarify googletest activity.
- Throw a CMake error if googletest not present and BUILD_TESTS=ON
2018-06-25 09:02:03 -06:00
Lenny Komow 77909b481f repo: Make tests not try to build without gtest
Change-Id: Idf3ed7bca713cb7ec1964513ac072344feaf17e6
2018-06-06 15:40:13 -06:00
Lenny Komow 0f3ba0365e repo: Modify gtest build logic
Change the logic regarding building the loader tests and Google Test
to match that of Glslang and Vulkan-ValidationLayers

Change-Id: I9f5a9b5385369514e3bec979c8de75ae432d00a6
2018-06-06 14:45:26 -06:00
Lenny Komow 79bf2b4bee docs: Document new google test mechanism
Change-Id: Ib51d38610ba554082391495878bf0113a2885bc0
2018-06-04 15:59:51 -06:00
Lenny Komow 16d63efea2 repo: Remove google test submodule
Change-Id: I25734926cdf267e565e0ab5878184a0955e435ee
2018-06-04 15:59:51 -06:00