blob: 4b6c01cb4992fe912c5aa2946d055d600d283951 (
plain)
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
|
From 66ccfc283f7d3bf4cf065c18a25e4edd8b981c0b Mon Sep 17 00:00:00 2001
From: Awais Belal <awais_belal@mentor.com>
Date: Wed, 31 Aug 2016 13:11:09 +0500
Subject: [PATCH] install samples
The samples are built but not installed correctly. This
fixes the issues and deploys all the built samples as
necessary.
Signed-off-by: Awais Belal <awais_belal@mentor.com>
---
API-Samples/CMakeLists.txt | 4 ++++
Sample-Programs/Hologram/CMakeLists.txt | 1 +
2 files changed, 5 insertions(+)
diff --git a/API-Samples/CMakeLists.txt b/API-Samples/CMakeLists.txt
index fedad5d..73916e0 100644
--- a/API-Samples/CMakeLists.txt
+++ b/API-Samples/CMakeLists.txt
@@ -31,6 +31,7 @@ function(sampleExtGLSLShaders SNAME)
endforeach(SFILE)
add_executable(${SAMPLE_NAME} ${SAMPLE_NAME}/${SAMPLE_NAME}.cpp ${SHADER_FILES})
target_link_libraries(${SAMPLE_NAME} ${VULKAN_LOADER} ${UTILS_NAME} ${GLSLANG_LIBRARIES} ${PTHREAD})
+ install(TARGETS ${SAMPLE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
endfunction(sampleExtGLSLShaders)
# function to build a single-source-file sample that uses spirv shaders
@@ -44,6 +45,7 @@ function(sampleExtSPIRVShaders SNAME)
endforeach(SFILE)
add_executable(${SAMPLE_NAME} ${SAMPLE_NAME}/${SAMPLE_NAME}.cpp ${SHADER_FILES})
target_link_libraries(${SAMPLE_NAME} ${VULKAN_LOADER} ${UTILS_NAME} ${GLSLANG_LIBRARIES} ${PTHREAD})
+ install(TARGETS ${SAMPLE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
endfunction(sampleExtSPIRVShaders)
# function to build a simple single-source-file sample
@@ -127,6 +129,7 @@ function(sampleWithSingleFile)
elseif(UNIX)
add_executable(${SAMPLE_NAME} ${SAMPLE_NAME}/${SAMPLE_NAME}.cpp)
target_link_libraries(${SAMPLE_NAME} ${UTILS_NAME} ${GLSLANG_LIBRARIES} ${XCB_LIBRARIES} ${VULKAN_LOADER} ${PTHREAD} ${SPIRV_TOOLS_LIBRARIES})
+ install(TARGETS ${SAMPLE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
else()
add_executable(${SAMPLE_NAME} WIN32 ${SAMPLE_NAME}/${SAMPLE_NAME}.cpp)
target_link_libraries(${SAMPLE_NAME} ${UTILS_NAME} ${GLSLANG_LIBRARIES} ${VULKAN_LOADER} ${WINLIBS} ${SPIRV_TOOLS_LIBRARIES})
@@ -148,6 +151,7 @@ function(sampleInlineGLSLShaders)
if(UNIX)
add_executable(${SAMPLE_NAME} ${SAMPLE_NAME}/${SAMPLE_NAME}.cpp)
target_link_libraries(${SAMPLE_NAME} ${GLSLANG_LIBRARIES} ${XCB_LIBRARIES} ${VULKAN_LOADER} ${PTHREAD})
+ install(TARGETS ${SAMPLE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
else()
add_executable(${SAMPLE_NAME} WIN32 ${SAMPLE_NAME}/${SAMPLE_NAME}.cpp)
target_link_libraries(${SAMPLE_NAME} ${GLSLANG_LIBRARIES} ${VULKAN_LOADER} ${WINLIBS})
diff --git a/Sample-Programs/Hologram/CMakeLists.txt b/Sample-Programs/Hologram/CMakeLists.txt
index 779ecb8..ab04b44 100644
--- a/Sample-Programs/Hologram/CMakeLists.txt
+++ b/Sample-Programs/Hologram/CMakeLists.txt
@@ -83,3 +83,4 @@ add_executable(Hologram ${sources})
target_compile_definitions(Hologram ${definitions})
target_include_directories(Hologram ${includes})
target_link_libraries(Hologram ${libraries})
+install(TARGETS Hologram DESTINATION ${CMAKE_INSTALL_BINDIR})
--
1.9.1
|