SET(PLUMAGE_RENDER "${CMAKE_CURRENT_SOURCE_DIR}/render") message("working path ${PLUMAGE_RENDER}") # Main set(MAIN_FILE ${PLUMAGE_RENDER}/render.h ${PLUMAGE_RENDER}/render.cpp ) set(GLTF_MODEL_LOADER "${PLUMAGE_RENDER}/glTFBoundingBox.h" "${PLUMAGE_RENDER}/glTFBoundingBox.cpp" ) # wayland requires additional source files IF(USE_WAYLAND_WSI) SET(SOURCE ${SOURCE} ${CMAKE_BINARY_DIR}/xdg-shell-client-protocol.h ${CMAKE_BINARY_DIR}/xdg-shell-protocol.c ) ENDIF() # Add shaders #set(SHADER_DIR_GLSL "../data/buster_drone/shaders/glsl") #file(GLOB SHADERS_GLSL "${SHADER_DIR_GLSL}/*.vert" "${SHADER_DIR_GLSL}/*.frag" "${SHADER_DIR_GLSL}/*.comp" "${SHADER_DIR_GLSL}/*.geom" "${SHADER_DIR_GLSL}/*.tesc" "${SHADER_DIR_GLSL}/*.tese" "${SHADER_DIR_GLSL}/*.mesh" "${SHADER_DIR_GLSL}/*.task" "${SHADER_DIR_GLSL}/*.rgen" "${SHADER_DIR_GLSL}/*.rchit" "${SHADER_DIR_GLSL}/*.rmiss" "${SHADER_DIR_GLSL}/*.rcall") #set(SHADER_DIR_HLSL "../data/buster_drone/shaders/hlsl") #file(GLOB SHADERS_HLSL "${SHADER_DIR_HLSL}/*.vert" "${SHADER_DIR_HLSL}/*.frag" "${SHADER_DIR_HLSL}/*.comp" "${SHADER_DIR_HLSL}/*.geom" "${SHADER_DIR_HLSL}/*.tesc" "${SHADER_DIR_HLSL}/*.tese" "${SHADER_DIR_HLSL}/*.mesh" "${SHADER_DIR_HLSL}/*.task" "${SHADER_DIR_HLSL}/*.rgen" "${SHADER_DIR_HLSL}/*.rchit" "${SHADER_DIR_HLSL}/*.rmiss" "${SHADER_DIR_HLSL}/*.rcall") #source_group("Shaders\\GLSL" FILES ${SHADERS_GLSL}) #source_group("Shaders\\HLSL" FILES ${SHADERS_HLSL}) # Add optional readme / tutorial #file(GLOB README_FILES "${HOMEWORK_FOLDER}/*.md") include_directories(${3rdParty_gli_path}) include_directories(${3rdParty_glm_path}) include_directories(${3rdParty_imgui_path}) include_directories(${3rdParty_stb_path}) include_directories(${3rdParty_tinygltf_path}) include_directories(${3rdParty_ktx_path}) include_directories(${3rdParty_ktx_otherInclude_path}) include_directories(${3rdParty_vulkan_path}) include_directories(${lib_base_path}) if(WIN32) add_executable(${RenderName} WIN32 ${SHADERS_GLSL} ${SHADERS_HLSL} ${MAIN_FILE} ${GLTF_MODEL_LOADER} "render/glTFModel.h" "render/glTFModel.cpp" "render/renderFoundation.h" "render/renderFoundation.cpp" ) target_link_libraries(${RenderName} base ${Vulkan_LIBRARY} ${WINLIBS}) endif() set_target_properties(${RenderName} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) if(RESOURCE_INSTALL_DIR) install(TARGETS ${RenderName} DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() #if(WIN32) # target_compile_definitions(MyLib PRIVATE MYLIB_EXPORTS) #endif(UNIX AND NOT APPLE) # Linux及类似系统 # add_compile_options(-fvisibility=hidden) # add_compile_options(-fvisibility-inlines-hidden) #endif()