aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2018-04-11 12:26:57 -0600
committerMark Lobodzinski <mark@lunarg.com>2018-05-11 20:10:23 -0600
commitb37d3d8477db4ea1dc7ae25539b35a0e8e365a7f (patch)
treea5f9274a6095c62d73a9eb8bd1c8fa9220fb6cb0
parent4f8755eb8c93d30a7fb6d5611f481ba7a821b102 (diff)
downloadusermoji-b37d3d8477db4ea1dc7ae25539b35a0e8e365a7f.tar.xz
vulkaninfo: Move vulkaninfo from demos to top level
Change-Id: Ifb946c4eacd950f8c021399b87e9437edf5533bf
-rw-r--r--CMakeLists.txt4
-rw-r--r--demos/CMakeLists.txt2
-rw-r--r--vulkaninfo/CMakeLists.txt26
-rw-r--r--vulkaninfo/vulkaninfo.c (renamed from demos/vulkaninfo.c)0
-rwxr-xr-xvulkaninfo/vulkaninfo.vcxproj.user (renamed from demos/vulkaninfo.vcxproj.user)0
5 files changed, 30 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5019061a..c13c0992 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -152,6 +152,7 @@ else()
endif()
option(BUILD_DEMOS "Build demos" ON)
+option(BUILD_VULKANINFO "Build vulkaninfo" ON)
option(BUILD_ICD "Build icd" ON)
find_program(GLSLANG_VALIDATOR NAMES glslangValidator
@@ -194,6 +195,9 @@ add_definitions(-DAPI_NAME="${API_NAME}")
if(BUILD_DEMOS)
add_subdirectory(demos)
endif()
+if(BUILD_VULKANINFO)
+ add_subdirectory(vulkaninfo)
+endif()
if(BUILD_ICD)
add_subdirectory(icd)
endif()
diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt
index 6ea7f451..46b1f6b4 100644
--- a/demos/CMakeLists.txt
+++ b/demos/CMakeLists.txt
@@ -114,7 +114,6 @@ if(WIN32)
endforeach()
file(COPY cube.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos)
- file(COPY vulkaninfo.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos)
endif()
add_custom_command(
@@ -148,7 +147,6 @@ include_directories(
${DEMO_INCLUDE_DIRS}
)
-######################################################################################
# vulkaninfo
if(WIN32)
add_executable(vulkaninfo vulkaninfo.c vulkaninfo.rc)
diff --git a/vulkaninfo/CMakeLists.txt b/vulkaninfo/CMakeLists.txt
new file mode 100644
index 00000000..a804b070
--- /dev/null
+++ b/vulkaninfo/CMakeLists.txt
@@ -0,0 +1,26 @@
+# CMakeLists.txt file for building Vulkaninfo
+
+add_executable(vulkaninfo vulkaninfo.c)
+target_link_libraries(vulkaninfo Vulkan::Vulkan)
+
+if(WIN32)
+ target_compile_definitions(vulkaninfo PUBLIC -DVK_USE_PLATFORM_WIN32_KHR -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS)
+
+ # Use static MSVCRT libraries
+ foreach(configuration in CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
+ CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO)
+ if(${configuration} MATCHES "/MD")
+ string(REGEX REPLACE "/MD" "/MT" ${configuration} "${${configuration}}")
+ endif()
+ endforeach()
+
+ file(COPY vulkaninfo.vcxproj.user DESTINATION ${CMAKE_BINARY_DIR}/demos)
+endif()
+
+
+if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+ if(INSTALL_LVL_FILES)
+ install(TARGETS ${API_LOWERCASE}info DESTINATION ${CMAKE_INSTALL_BINDIR})
+ endif()
+endif()
+
diff --git a/demos/vulkaninfo.c b/vulkaninfo/vulkaninfo.c
index aabddb0e..aabddb0e 100644
--- a/demos/vulkaninfo.c
+++ b/vulkaninfo/vulkaninfo.c
diff --git a/demos/vulkaninfo.vcxproj.user b/vulkaninfo/vulkaninfo.vcxproj.user
index 591cdd91..591cdd91 100755
--- a/demos/vulkaninfo.vcxproj.user
+++ b/vulkaninfo/vulkaninfo.vcxproj.user