-
Notifications
You must be signed in to change notification settings - Fork 94
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
58 lines (48 loc) · 1.74 KB
/
CMakeLists.txt
File metadata and controls
58 lines (48 loc) · 1.74 KB
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
cmake_minimum_required (VERSION 3.10)
project(HLSL2GLSLConverter CXX)
set(SOURCE
src/HLSL2GLSLConverterApp.cpp
src/HLSL2GLSLConverterApp.h
)
if(PLATFORM_WIN32)
list(APPEND SOURCE src/HLSL2GLSLConverterAppWin32.cpp)
add_executable(HLSL2GLSLConverter ${SOURCE})
set_target_properties(HLSL2GLSLConverter PROPERTIES
VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/testshaders"
VS_DEBUGGER_COMMAND_ARGUMENTS "-i TessTestDX.dsh -o TessTestGL.dsh -t ds -d IncludeDir1 -d IncludeDir2 --no-glsl-definitions -p"
)
elseif(PLATFORM_LINUX)
list(APPEND SOURCE src/HLSL2GLSLConverterAppLinux.cpp)
add_executable(HLSL2GLSLConverter ${SOURCE})
elseif(PLATFORM_MACOS)
list(APPEND SOURCE src/HLSL2GLSLConverterAppMacOS.cpp)
add_executable(HLSL2GLSLConverter ${SOURCE})
else()
message(FATAL_ERROR "Unsupported platform")
endif()
set_common_target_properties(HLSL2GLSLConverter)
target_compile_definitions(HLSL2GLSLConverter PRIVATE UNICODE)
target_include_directories(HLSL2GLSLConverter
PRIVATE
${DILIGENT_ARGS_DIR}
)
target_link_libraries(HLSL2GLSLConverter
PRIVATE
Diligent-BuildSettings
Diligent-TargetPlatform
Diligent-Common
Diligent-GraphicsTools
Diligent-HLSL2GLSLConverterLib
Diligent-GraphicsEngineOpenGL-static
)
source_group("source" FILES ${SOURCE})
set_target_properties(HLSL2GLSLConverter PROPERTIES
FOLDER DiligentTools
)
if(DILIGENT_INSTALL_TOOLS)
install(TARGETS HLSL2GLSLConverter
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}/${DILIGENT_TOOLS_DIR}/$<CONFIG>"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/${DILIGENT_TOOLS_DIR}/$<CONFIG>"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}/${DILIGENT_TOOLS_DIR}/$<CONFIG>"
)
endif()