mirror of
https://gitee.com/openharmony/third_party_vulkan-loader
synced 2024-11-23 07:10:23 +00:00
Windows SDK: Rename vulkan.dll to vulkan.<major>.dll
This commit is contained in:
parent
8fba042d6a
commit
0ec1a913a4
@ -5,6 +5,10 @@ cmake_minimum_required(VERSION 2.8.11)
|
||||
project (VULKAN)
|
||||
# set (CMAKE_VERBOSE_MAKEFILE 1)
|
||||
|
||||
# The MAJOR number of the version we're building, used in naming
|
||||
# vulkan.<major>.dll (and other files).
|
||||
set(MAJOR "0")
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
# Header file for CMake settings
|
||||
@ -42,16 +46,16 @@ else()
|
||||
set(PYTHON_CMD "py")
|
||||
endif()
|
||||
|
||||
option(BUILD_TESTS "Build tests" ON)
|
||||
#option(BUILD_TESTS "Build tests" ON)
|
||||
|
||||
# loader: Generic VULKAN ICD loader
|
||||
# icd: Device dependent (DD) VULKAN components
|
||||
# tests: VULKAN tests
|
||||
add_subdirectory(loader)
|
||||
add_subdirectory(icd)
|
||||
if(BUILD_TESTS)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
#if(BUILD_TESTS)
|
||||
# add_subdirectory(tests)
|
||||
#endif()
|
||||
add_subdirectory(layers)
|
||||
add_subdirectory(demos)
|
||||
#add_subdirectory(tools/glave)
|
||||
|
@ -3,9 +3,15 @@ include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/vulkan.def
|
||||
COMMAND ${PYTHON_CMD} ${PROJECT_SOURCE_DIR}/loader/vk-loader-generate.py win-def-file vulkan all > ${CMAKE_CURRENT_BINARY_DIR}/vulkan.def
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/loader/vk-loader-generate.py ${PROJECT_SOURCE_DIR}/vulkan.py)
|
||||
if (WIN32)
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/vulkan.${MAJOR}.def
|
||||
COMMAND ${PYTHON_CMD} ${PROJECT_SOURCE_DIR}/loader/vk-loader-generate.py win-def-file vulkan.${MAJOR}.dll all > ${CMAKE_CURRENT_BINARY_DIR}/vulkan.${MAJOR}.def
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/loader/vk-loader-generate.py ${PROJECT_SOURCE_DIR}/vulkan.py)
|
||||
else()
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/vulkan.def
|
||||
COMMAND ${PYTHON_CMD} ${PROJECT_SOURCE_DIR}/loader/vk-loader-generate.py win-def-file vulkan.dll all > ${CMAKE_CURRENT_BINARY_DIR}/vulkan.def
|
||||
DEPENDS ${PROJECT_SOURCE_DIR}/loader/vk-loader-generate.py ${PROJECT_SOURCE_DIR}/vulkan.py)
|
||||
endif()
|
||||
|
||||
# DEBUG enables runtime loader ICD verification
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
|
||||
@ -29,11 +35,11 @@ set(LOADER_SRCS
|
||||
if (WIN32)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVK_PROTOTYPES -D_CRT_SECURE_NO_WARNINGS")
|
||||
|
||||
add_library(vulkan SHARED ${LOADER_SRCS} dirent_on_windows.c ${CMAKE_CURRENT_BINARY_DIR}/vulkan.def)
|
||||
set_target_properties(vulkan PROPERTIES LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/vulkan.def")
|
||||
add_library(VKstatic STATIC ${LOADER_SRCS} dirent_on_windows.c)
|
||||
set_target_properties(VKstatic PROPERTIES OUTPUT_NAME VKstatic)
|
||||
target_link_libraries(vulkan shlwapi)
|
||||
add_library(vulkan.${MAJOR} SHARED ${LOADER_SRCS} dirent_on_windows.c ${CMAKE_CURRENT_BINARY_DIR}/vulkan.${MAJOR}.def)
|
||||
set_target_properties(vulkan.${MAJOR} PROPERTIES LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/vulkan.${MAJOR}.def")
|
||||
add_library(VKstatic.${MAJOR} STATIC ${LOADER_SRCS} dirent_on_windows.c)
|
||||
set_target_properties(VKstatic.${MAJOR} PROPERTIES OUTPUT_NAME VKstatic.${MAJOR})
|
||||
target_link_libraries(vulkan.${MAJOR} shlwapi)
|
||||
endif()
|
||||
if (NOT WIN32)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVK_PROTOTYPES -Wpointer-arith")
|
||||
|
Loading…
Reference in New Issue
Block a user