forked from GPUOpen-Tools/dev_driver_tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
85 lines (74 loc) · 3.51 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
cmake_minimum_required (VERSION 2.6)
# policy to allow input directories to not have CMakeLists.txt files
if(POLICY CMP0014)
cmake_policy(SET CMP0014 OLD)
endif()
# tell cmake to put the final executable in the correct place. Paths will be
# different on Windows & Linux
IF (INTERNAL_BUILD)
project (DevDriverTools-Internal)
IF(WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../Release-Internal)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../Debug-Internal)
ELSE(WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../../Release-Internal)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../../Debug-Internal)
ENDIF(WIN32)
ELSE (INTERNAL_BUILD)
project (DevDriverTools)
IF(WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../Release)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../Debug)
ELSE(WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../../Release)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../../Debug)
ENDIF(WIN32)
ENDIF(INTERNAL_BUILD)
# If this is an internal build, define the switch that RDS/RDP can use.
IF (INTERNAL_BUILD)
IF(WIN32)
add_compile_options(/D "RADEON_DRIVER_TOOLS_INTERNAL")
ELSEIF(UNIX)
add_compile_options(-DRADEON_DRIVER_TOOLS_INTERNAL)
ENDIF(WIN32)
ENDIF(INTERNAL_BUILD)
# Define the switch that RDS/RDP can use if unified driver settings are enabled.
IF (ENABLE_UNIFIED_DRIVER_SETTINGS)
add_definitions(-DENABLE_RADEON_UNIFIED_DRIVER_SETTINGS)
ENDIF(ENABLE_UNIFIED_DRIVER_SETTINGS)
add_definitions(-DGPUOPEN_CLIENT_INTERFACE_MAJOR_VERSION=35)
IF (ENABLE_DRIVER_LOGGING)
add_definitions(-DENABLE_RADEON_DRIVER_LOGGING)
ENDIF(ENABLE_DRIVER_LOGGING)
# Add .pdb files to Windows release build
IF(WIN32)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
ENDIF(WIN32)
include_directories(source/DevDriverComponents/inc)
include_directories(source/DevDriverComponents/inc/imported/rapidjson/include)
include_directories(source/DevDriverComponents/message/inc)
include_directories(source/DevDriverComponents/src/imported/metrohash/src)
IF(WIN32)
include_directories(source/DevDriverComponents/listener)
ELSE(WIN32)
add_subdirectory(source/DevDriverComponents/listener)
ENDIF(WIN32)
if(CMAKE_CL_64)
# Add the QtCommon Scaling project to the solution.
include_directories("${PROJECT_SOURCE_DIR}/../QtCommon/Scaling/")
add_subdirectory (${PROJECT_SOURCE_DIR}/../QtCommon/Scaling obj/QtCommon/Scaling)
# Add the QtCommon Util project to the solution.
include_directories("${PROJECT_SOURCE_DIR}/../QtCommon/Util/")
add_subdirectory (${PROJECT_SOURCE_DIR}/../QtCommon/Util obj/QtCommon/Util)
# Add the QtCommon QtCustomWidgets project to the solution.
include_directories("${PROJECT_SOURCE_DIR}/../QtCommon/CustomWidgets/")
add_subdirectory (${PROJECT_SOURCE_DIR}/../QtCommon/CustomWidgets obj/QtCommon/CustomWidgets)
# Add RDS and RDP projects to solution.
add_subdirectory(source/RDS obj/RDS)
add_subdirectory(source/RDP obj/RDP)
ENDIF(CMAKE_CL_64)
add_subdirectory(source/DevDriverComponents/src obj/DevDriverComponents)
add_subdirectory(source/DevDriverAPI obj/DevDriverAPI)