mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2024-12-26 02:41:01 +00:00
Doxygen added to CMake, shader project dependency added to Sample Project
This commit is contained in:
parent
6bdc8e1bf8
commit
cf6b1a9270
@ -31,4 +31,28 @@ message(STATUS "VMA_DEBUG_INITIALIZE_ALLOCATIONS = ${VMA_DEBUG_INITIALIZE_ALLOCA
|
||||
message(STATUS "VMA_DEBUG_GLOBAL_MUTEX = ${VMA_DEBUG_GLOBAL_MUTEX}")
|
||||
message(STATUS "VMA_DEBUG_DONT_EXCEED_MAX_MEMORY_ALLOCATION_COUNT = ${VMA_DEBUG_DONT_EXCEED_MAX_MEMORY_ALLOCATION_COUNT}")
|
||||
|
||||
IF(VMA_BUILD_SAMPLE)
|
||||
SET(VMA_BUILD_SAMPLE_SHADERS ON)
|
||||
ENDIF(VMA_BUILD_SAMPLE)
|
||||
|
||||
find_package(Doxygen)
|
||||
option(BUILD_DOCUMENTATION "Create and install the HTML based API documentation (requires Doxygen)" OFF)
|
||||
|
||||
if (DOXYGEN_FOUND AND BUILD_DOCUMENTATION)
|
||||
# set input and output files
|
||||
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile)
|
||||
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
|
||||
|
||||
# request to configure the file
|
||||
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
|
||||
# note the option ALL which allows to build the docs together with the application
|
||||
add_custom_target( doc_doxygen ALL
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating API documentation with Doxygen"
|
||||
VERBATIM )
|
||||
else (DOXYGEN_FOUND AND BUILD_DOCUMENTATION)
|
||||
message("Doxygen need to be installed to generate the doxygen documentation")
|
||||
endif (DOXYGEN_FOUND AND BUILD_DOCUMENTATION)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
4
Doxyfile
4
Doxyfile
@ -58,7 +58,7 @@ PROJECT_LOGO =
|
||||
# entered, it will be relative to the location where doxygen was started. If
|
||||
# left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = docs
|
||||
OUTPUT_DIRECTORY = ../docs
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
|
||||
# directories (in 2 levels) under the output directory of each output format and
|
||||
@ -864,7 +864,7 @@ WARN_LOGFILE =
|
||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = include/vk_mem_alloc.h
|
||||
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/include/vk_mem_alloc.h
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
|
@ -2,6 +2,10 @@ set(VMA_LIBRARY_SOURCE_FILES
|
||||
VmaUsage.cpp
|
||||
)
|
||||
|
||||
set(CMAKE_DEBUG_POSTFIX d)
|
||||
set(CMAKE_RELWITHDEBINFO_POSTFIX rd)
|
||||
set(CMAKE_MINSIZEREL_POSTFIX s)
|
||||
|
||||
add_library(VulkanMemoryAllocator ${VMA_LIBRARY_SOURCE_FILES})
|
||||
|
||||
set_target_properties(
|
||||
@ -33,6 +37,9 @@ target_compile_definitions(
|
||||
VMA_RECORDING_ENABLED=$<BOOL:${VMA_RECORDING_ENABLED}>
|
||||
)
|
||||
|
||||
install(TARGETS VulkanMemoryAllocator DESTINATION lib)
|
||||
install(FILES ../include/vk_mem_alloc.h DESTINATION include)
|
||||
|
||||
if (VMA_BUILD_SAMPLE)
|
||||
if(WIN32)
|
||||
set(VMA_SAMPLE_SOURCE_FILES
|
||||
@ -43,7 +50,8 @@ if (VMA_BUILD_SAMPLE)
|
||||
)
|
||||
|
||||
add_executable(VmaSample ${VMA_SAMPLE_SOURCE_FILES})
|
||||
|
||||
add_dependencies(VmaSample VmaSampleShaders)
|
||||
|
||||
# Visual Studio specific settings
|
||||
if(${CMAKE_GENERATOR} MATCHES "Visual Studio.*")
|
||||
# Use Unicode instead of multibyte set
|
||||
@ -73,8 +81,8 @@ if (VMA_BUILD_SAMPLE)
|
||||
|
||||
target_link_libraries(
|
||||
VmaSample
|
||||
|
||||
PRIVATE
|
||||
|
||||
VulkanMemoryAllocator
|
||||
Vulkan::Vulkan
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user