diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2016-12-08 08:52:56 -0700 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2016-12-08 14:52:38 -0700 |
| commit | fefd170f82e7ea09751346b147550d2055b6d438 (patch) | |
| tree | 0160128ce286ac20c6d27491a6f7c6d3dada00a9 | |
| parent | 5e6d91b00fb852b3b8db61e59469ba9a7097ca07 (diff) | |
| download | usermoji-fefd170f82e7ea09751346b147550d2055b6d438.tar.xz | |
loader: Add CMake copy of def file to build dir
Change-Id: I377ef3e58b49c345fcc5ac8d10bdee7e4c059bed
| -rw-r--r-- | loader/CMakeLists.txt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt index a428ae58..070c14ae 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -4,9 +4,11 @@ include_directories( ) if (WIN32) - add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${API_LOWERCASE}-${MAJOR}.def - COMMAND ${PYTHON_CMD} ${SCRIPTS_DIR}/vk-generate.py ${DisplayServer} win-def-file ${API_LOWERCASE}-${MAJOR}.dll all > ${CMAKE_CURRENT_BINARY_DIR}/${API_LOWERCASE}-${MAJOR}.def - DEPENDS ${SCRIPTS_DIR}/vk-generate.py ${SCRIPTS_DIR}/vulkan.py) + FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/${API_LOWERCASE}-${MAJOR}.def DEF_FILE) + add_custom_target(copy-def-file ALL + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${DEF_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${API_LOWERCASE}-${MAJOR}.def + VERBATIM + ) endif() # DEBUG enables runtime loader ICD verification @@ -61,7 +63,7 @@ if (WIN32) target_compile_options(loader-norm PUBLIC "$<$<CONFIG:DEBUG>:${LOCAL_C_FLAGS_DBG}>") add_library(loader-opt OBJECT ${OPT_LOADER_SRCS}) target_compile_options(loader-opt PUBLIC "$<$<CONFIG:DEBUG>:${LOCAL_C_FLAGS_REL}>") - add_library(${API_LOWERCASE}-${MAJOR} SHARED $<TARGET_OBJECTS:loader-opt> $<TARGET_OBJECTS:loader-norm> ${CMAKE_CURRENT_BINARY_DIR}/${API_LOWERCASE}-${MAJOR}.def ${CMAKE_CURRENT_SOURCE_DIR}/loader.rc) + add_library(${API_LOWERCASE}-${MAJOR} SHARED $<TARGET_OBJECTS:loader-opt> $<TARGET_OBJECTS:loader-norm> ${CMAKE_CURRENT_SOURCE_DIR}/${API_LOWERCASE}-${MAJOR}.def ${CMAKE_CURRENT_SOURCE_DIR}/loader.rc) add_library(VKstatic.${MAJOR} STATIC $<TARGET_OBJECTS:loader-opt> $<TARGET_OBJECTS:loader-norm>) set_target_properties(VKstatic.${MAJOR} PROPERTIES OUTPUT_NAME VKstatic.${MAJOR}) target_link_libraries(${API_LOWERCASE}-${MAJOR} shlwapi) |
