rename to projects (DOES NOT COMPILE)
This commit is contained in:
43
projects/apis/vulkan/CMakeLists.txt
Normal file
43
projects/apis/vulkan/CMakeLists.txt
Normal file
@@ -0,0 +1,43 @@
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS on)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
project(GryphnVulkanImpl)
|
||||
|
||||
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS
|
||||
"src/*.c" "src/*.h"
|
||||
)
|
||||
|
||||
if (APPLE)
|
||||
file(GLOB_RECURSE METAL_FILES CONFIGURE_DEPENDS
|
||||
"src/*.m"
|
||||
)
|
||||
endif()
|
||||
|
||||
find_package(Vulkan REQUIRED)
|
||||
add_library(GryphnVulkanImpl STATIC ${SOURCE_FILES} ${METAL_FILES})
|
||||
target_include_directories(GryphnVulkanImpl PUBLIC
|
||||
${Vulkan_INCLUDE_DIRS}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../../include/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../utils/
|
||||
src/
|
||||
)
|
||||
add_compile_definitions(GN_REVEAL_IMPL)
|
||||
target_link_libraries(GryphnVulkanImpl ${Vulkan_LIBRARY})
|
||||
|
||||
if(WIN32)
|
||||
add_compile_definitions(GN_PLATFORM_WIN32)
|
||||
endif()
|
||||
if(APPLE)
|
||||
target_link_libraries(GryphnVulkanImpl
|
||||
"-framework IOKit"
|
||||
"-framework CoreFoundation"
|
||||
"-framework CoreGraphics"
|
||||
"-framework AppKit"
|
||||
"-framework Metal"
|
||||
"-framework QuartzCore"
|
||||
)
|
||||
add_compile_definitions(GN_PLATFORM_MACOS)
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE)
|
||||
add_compile_definitions(GN_PLATFORM_LINUX)
|
||||
endif()
|
Reference in New Issue
Block a user