diff options
author | Mark Young <marky@lunarg.com> | 2017-03-06 13:57:13 -0700 |
---|---|---|
committer | Mark Young <marky@lunarg.com> | 2017-03-06 14:14:49 -0700 |
commit | e3ea4e104100dcb320698fd772ea80da78eb07aa (patch) | |
tree | b03dd6f80e895a02257b6ac618f214a3475f7002 /loader | |
parent | 74d66215a1bd604023168ae6c6d02daa8487ac06 (diff) |
loader: gh1528 - Move generated files
Move the loader-specific generated files into the loader binary
folder when built.
Change-Id: Ib5f04eada8eb0b89d1d5e50adaf1e964d4f1a6d6
Diffstat (limited to 'loader')
-rw-r--r-- | loader/CMakeLists.txt | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt index d4abafff..f7f898dc 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -66,6 +66,12 @@ set(OPT_LOADER_SRCS add_definitions(-DAPI_NAME="${API_NAME}") +run_vk_xml_generate(loader_extension_generator.py vk_loader_extensions.h) +run_vk_xml_generate(loader_extension_generator.py vk_loader_extensions.c) +add_custom_target(loader_gen_files DEPENDS + vk_loader_extensions.h + vk_loader_extensions.c + ) if (WIN32) # Use static MSVCRT libraries @@ -85,11 +91,11 @@ if (WIN32) separate_arguments(LOCAL_C_FLAGS_REL WINDOWS_COMMAND ${CMAKE_C_FLAGS_RELEASE}) add_library(loader-norm OBJECT ${NORMAL_LOADER_SRCS} dirent_on_windows.c) - add_dependencies(loader-norm generate_helper_files) + add_dependencies(loader-norm generate_helper_files loader_gen_files) target_compile_options(loader-norm PUBLIC "$<$<CONFIG:DEBUG>:${LOCAL_C_FLAGS_DBG}>") add_library(loader-opt OBJECT ${OPT_LOADER_SRCS}) - add_dependencies(loader-opt generate_helper_files) + add_dependencies(loader-opt generate_helper_files loader_gen_files) 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) @@ -98,7 +104,7 @@ if (WIN32) set_target_properties(${API_LOWERCASE}-${MAJOR} PROPERTIES LINK_FLAGS_DEBUG /ignore:4098) set_target_properties(VKstatic.${MAJOR} PROPERTIES OUTPUT_NAME VKstatic.${MAJOR}) target_link_libraries(${API_LOWERCASE}-${MAJOR} shlwapi) - add_dependencies(${API_LOWERCASE}-${MAJOR} generate_helper_files) + add_dependencies(${API_LOWERCASE}-${MAJOR} generate_helper_files loader_gen_files) target_link_libraries(VKstatic.${MAJOR} shlwapi) if (CMAKE_GENERATOR MATCHES "^Visual Studio.*") @@ -119,7 +125,7 @@ else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wpointer-arith") add_library(${API_LOWERCASE} SHARED ${NORMAL_LOADER_SRCS} ${OPT_LOADER_SRCS}) - add_dependencies(${API_LOWERCASE} generate_helper_files) + add_dependencies(${API_LOWERCASE} generate_helper_files loader_gen_files) set_target_properties(${API_LOWERCASE} PROPERTIES SOVERSION "1" VERSION "1.0.42") target_link_libraries(${API_LOWERCASE} -ldl -lpthread -lm) |