1# ~~~
2# Copyright (c) 2021 Valve Corporation
3# Copyright (c) 2021 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
18
19set(TEST_ICD_VERSION_2_DEFINES TEST_ICD_EXPORT_NEGOTIATE_INTERFACE_VERSION=1 TEST_ICD_EXPORT_ICD_GIPA=1)
20
21AddSharedLibrary(test_icd_export_none DEF_FILE test_icd_0
22    SOURCES test_icd.cpp
23    DEFINITIONS "")
24AddSharedLibrary(test_icd_export_icd_gipa DEF_FILE test_icd_gipa
25    SOURCES test_icd.cpp
26    DEFINITIONS TEST_ICD_EXPORT_ICD_GIPA=1)
27AddSharedLibrary(test_icd_export_negotiate_interface_version DEF_FILE test_icd_negotiate_version
28    SOURCES test_icd.cpp
29    DEFINITIONS TEST_ICD_EXPORT_NEGOTIATE_INTERFACE_VERSION=1)
30AddSharedLibrary(test_icd_version_2 DEF_FILE test_icd_2
31    SOURCES test_icd.cpp
32    DEFINITIONS ${TEST_ICD_VERSION_2_DEFINES})
33AddSharedLibrary(test_icd_version_2_export_icd_enumerate_adapter_physical_devices DEF_FILE test_icd_2_enum_adapter
34    SOURCES test_icd.cpp
35    DEFINITIONS TEST_ICD_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES=1 ${TEST_ICD_VERSION_2_DEFINES})
36AddSharedLibrary(test_icd_version_2_export_icd_gpdpa DEF_FILE test_icd_2_gpdpa
37    SOURCES test_icd.cpp
38    DEFINITIONS TEST_ICD_EXPORT_ICD_GPDPA=1 ${TEST_ICD_VERSION_2_DEFINES})
39AddSharedLibrary(test_icd_version_6 DEF_FILE test_icd_6
40    SOURCES test_icd.cpp
41    DEFINITIONS TEST_ICD_EXPORT_ICD_GPDPA=1 TEST_ICD_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES=1 ${TEST_ICD_VERSION_2_DEFINES})
42AddSharedLibrary(test_icd_version_7 DEF_FILE test_icd_7
43    SOURCES test_icd.cpp
44    DEFINITIONS TEST_ICD_EXPOSE_VERSION_7=1 ${TEST_ICD_VERSION_2_DEFINES})
45AddSharedLibrary(test_icd_version_7_with_additional_exports DEF_FILE test_icd_7_with_exports
46    SOURCES test_icd.cpp
47    DEFINITIONS TEST_ICD_EXPOSE_VERSION_7=1 TEST_ICD_EXPORT_ICD_GPDPA=1
48    TEST_ICD_EXPORT_ICD_ENUMERATE_ADAPTER_PHYSICAL_DEVICES=1 ${TEST_ICD_VERSION_2_DEFINES})
49AddSharedLibrary(test_unicode DEF_FILE test_icd_2
50    SOURCES test_icd.cpp
51    DEFINITIONS ${TEST_ICD_VERSION_2_DEFINES})
52set_target_properties(test_unicode PROPERTIES OUTPUT_NAME "�") # Test unicode library
53