@@ -32,21 +32,19 @@ if(Vulkan_FOUND)
3232 target_compile_definitions (${PROJECT_NAME} PRIVATE
3333 GLM_FORCE_RADIANS
3434 GLM_FORCE_DEPTH_ZERO_TO_ONE)
35+ # -----------------
3536
36- # ---- Install ----
37-
38- install (TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
3937
4038 # ---- CPack ----
41-
39+ install (TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
40+ install (DIRECTORY ${CMAKE_BINARY_DIR} /bin/shaders
41+ DESTINATION ./
42+ FILES_MATCHING PATTERN "*_*.spv" )
4243 include (InstallRequiredSystemLibraries)
43-
4444 set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR} /../../LICENSE" )
4545 set (CPACK_PACKAGE_VERSION ${PROJECT_VERSION} )
4646 set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "rayx-ui - RAYX GUI Application" )
47-
4847 include (CPack)
49-
5048 # -----------------
5149
5250 # ---- GLFW Options ----
@@ -55,7 +53,6 @@ if(Vulkan_FOUND)
5553 option (GLFW_BUILD_DOCS "Build the GLFW documentation" OFF )
5654 option (GLFW_INSTALL "Generate installation target" OFF )
5755 option (GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF )
58-
5956 # ----------------------
6057
6158 # ---- Dependencies ----
@@ -69,7 +66,6 @@ if(Vulkan_FOUND)
6966 ${STB_DIR}
7067 ..
7168 )
72-
7369 # ----------------------
7470
7571 # ---- Compile Shaders ----
@@ -87,7 +83,7 @@ if(Vulkan_FOUND)
8783 string (SUBSTRING ${SHADER_EXT} 1 -1 SHADER_STAGE) # Remove the leading '.' from the extension
8884
8985 # Set output file name
90- set (OUTPUT_FILE "${CMAKE_BINARY_DIR} /bin/${SHADER_NAME} _${SHADER_STAGE} .spv" )
86+ set (OUTPUT_FILE "${CMAKE_BINARY_DIR} /bin/shaders/ ${SHADER_NAME} _${SHADER_STAGE} .spv" )
9187
9288 # Create a custom command for each shader file
9389 add_custom_command (
@@ -108,6 +104,5 @@ if(Vulkan_FOUND)
108104
109105 # Call the function to compile all shaders in the specified directory
110106 compile_shaders(RAYX_UI_COMPILE_SHADER "${PROJECT_SOURCE_DIR} /src/Shaders" )
111-
112107 # ------------------------
113108endif () # Vulkan_FOUND
0 commit comments