• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# ~~~
2# Copyright (c) 2021-2022 Valve Corporation
3# Copyright (c) 2021-2022 LunarG, Inc.
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9#     http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16# ~~~
17
18set(TEST_LAYER_BASE_EXPORTS TEST_LAYER_EXPORT_ENUMERATE_FUNCTIONS=1)
19set(TEST_LAYER_VERSION_0_EXPORTS ${TEST_LAYER_BASE_EXPORTS} TEST_LAYER_EXPORT_LAYER_NAMED_GIPA=1 TEST_LAYER_EXPORT_LAYER_NAMED_GDPA=1)
20set(TEST_LAYER_VERSION_1_EXPORTS ${TEST_LAYER_VERSION_0_EXPORTS} TEST_LAYER_EXPORT_NO_PREFIX_GIPA=1 TEST_LAYER_EXPORT_NO_PREFIX_GDPA=1)
21set(TEST_LAYER_VERSION_2_EXPORTS ${TEST_LAYER_VERSION_1_EXPORTS} TEST_LAYER_EXPORT_GET_PHYSICAL_DEVICE_PROC_ADDR=1
22    LAYER_EXPORT_NEGOTIATE_LOADER_LAYER_INTERFACE_VERSION=1)
23
24AddSharedLibrary(test_layer_export_base DEF_FILE test_layer_base SOURCES test_layer.cpp DEFINITIONS ${TEST_LAYER_BASE_EXPORTS})
25AddSharedLibrary(test_layer_export_version_0 DEF_FILE test_layer_0 SOURCES test_layer.cpp DEFINITIONS ${TEST_LAYER_VERSION_0_EXPORTS})
26AddSharedLibrary(test_layer_export_version_1 DEF_FILE test_layer_1 SOURCES test_layer.cpp DEFINITIONS ${TEST_LAYER_VERSION_1_EXPORTS})
27AddSharedLibrary(test_layer_export_version_2 DEF_FILE test_layer_2 SOURCES test_layer.cpp DEFINITIONS ${TEST_LAYER_VERSION_2_EXPORTS})
28
29# Wrap Objects layer which wraps dispatchable handles to test that the loader will properly
30# work in the case where handles in the terminator don't match handles in the trampoline portion.
31set(WRAP_LAYER_VERSION_1_EXPORTS
32        TEST_LAYER_EXPORT_DIRECT_DISP=1
33        TEST_LAYER_EXPORT_MAINT_1=1
34    )
35set(WRAP_LAYER_VERSION_2_EXPORTS
36        TEST_LAYER_EXPORT_DISP_SURF_COUNT=1
37        TEST_LAYER_EXPORT_PRESENT_IMAGE=1
38    )
39set(WRAP_LAYER_VERSION_3_EXPORTS
40        TEST_LAYER_EXPORT_DIRECT_DISP=1
41        TEST_LAYER_EXPORT_DISP_SURF_COUNT=1
42        TEST_LAYER_EXPORT_MAINT_1=1
43        TEST_LAYER_EXPORT_PRESENT_IMAGE=1
44    )
45
46AddSharedLibrary(test_layer_wrap_objects DEF_FILE wrap_objects SOURCES wrap_objects.cpp DEFINITIONS "")
47AddSharedLibrary(test_layer_wrap_objects_1 DEF_FILE wrap_objects_1 SOURCES wrap_objects.cpp DEFINITIONS ${WRAP_LAYER_VERSION_1_EXPORTS})
48AddSharedLibrary(test_layer_wrap_objects_2 DEF_FILE wrap_objects_2 SOURCES wrap_objects.cpp DEFINITIONS ${WRAP_LAYER_VERSION_2_EXPORTS})
49AddSharedLibrary(test_layer_wrap_objects_3 DEF_FILE wrap_objects_3 SOURCES wrap_objects.cpp DEFINITIONS ${WRAP_LAYER_VERSION_3_EXPORTS})
50