mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Re-arrange CMakeLists.txt a bit to separate qrenderdoc & pyrenderdoc
* Now you can build the python modules without building the full UI, which is mostly useful for docs builds so we can do a minimal compile and still generate the docs.
This commit is contained in:
+9
-1
@@ -117,6 +117,7 @@ option(ENABLE_GLES "Enable GL ES driver" OFF)
|
||||
option(ENABLE_VULKAN "Enable Vulkan driver" ON)
|
||||
option(ENABLE_RENDERDOCCMD "Enable renderdoccmd" ON)
|
||||
option(ENABLE_QRENDERDOC "Enable qrenderdoc" ON)
|
||||
option(ENABLE_PYRENDERDOC "Enable renderdoc python modules" ON)
|
||||
|
||||
option(ENABLE_XLIB "Enable xlib windowing support" ON)
|
||||
option(ENABLE_XCB "Enable xcb windowing support" ON)
|
||||
@@ -161,6 +162,10 @@ if(ANDROID)
|
||||
message(STATUS "Disabling qrenderdoc for android build")
|
||||
set(ENABLE_QRENDERDOC OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# Android also doesn't support the python modules
|
||||
message(STATUS "Disabling renderdoc python modules for android build")
|
||||
set(ENABLE_PYRENDERDOC OFF CACHE BOOL "" FORCE)
|
||||
|
||||
message(STATUS "Using Android ABI ${ANDROID_ABI}")
|
||||
message(STATUS "Using Android native API level ${ANDROID_NATIVE_API_LEVEL}")
|
||||
|
||||
@@ -257,7 +262,10 @@ if(ENABLE_RENDERDOCCMD)
|
||||
add_subdirectory(renderdoccmd)
|
||||
endif()
|
||||
|
||||
if(ENABLE_QRENDERDOC)
|
||||
# these variables are handled within the CMakeLists.txt in qrenderdoc,
|
||||
# but we need to add it if either is enabled since the swig bindings
|
||||
# are handled in common
|
||||
if(ENABLE_QRENDERDOC OR ENABLE_PYRENDERDOC)
|
||||
add_subdirectory(qrenderdoc)
|
||||
endif()
|
||||
|
||||
|
||||
+15
-10
@@ -210,21 +210,19 @@ foreach(in ${swig_interfaces})
|
||||
list(APPEND swig_output ${swig_file}.py.c)
|
||||
endforeach()
|
||||
|
||||
add_custom_target(swig-bindings ALL DEPENDS ${swig_output})
|
||||
|
||||
if(ENABLE_QRENDERDOC)
|
||||
|
||||
# The case here is deliberately not matching the executable name
|
||||
# This means the custom command doesn't create this output file,
|
||||
# which causes CMake to rerun this target every time so that Qt
|
||||
# can do dependency checking and rebuild anything necessary.
|
||||
add_custom_command(OUTPUT QRenderDoc
|
||||
COMMAND ${QMAKE_QT5_COMMAND} "CMAKE_DIR=${CMAKE_BINARY_DIR}" ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND $(MAKE)
|
||||
DEPENDS RenderDoc.icns
|
||||
DEPENDS ${swig_output})
|
||||
add_custom_target(build-qrenderdoc ALL DEPENDS QRenderDoc DEPENDS renderdoc)
|
||||
|
||||
# Build python modules - primarily used for constructing documentation
|
||||
if(UNIX AND NOT APPLE)
|
||||
add_subdirectory(Code/pyrenderdoc)
|
||||
endif()
|
||||
COMMAND ${QMAKE_QT5_COMMAND} "CMAKE_DIR=${CMAKE_BINARY_DIR}" ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND $(MAKE)
|
||||
DEPENDS RenderDoc.icns)
|
||||
add_custom_target(build-qrenderdoc ALL DEPENDS QRenderDoc DEPENDS renderdoc DEPENDS swig-bindings)
|
||||
|
||||
install (PROGRAMS ${CMAKE_BINARY_DIR}/bin/qrenderdoc DESTINATION bin)
|
||||
|
||||
@@ -245,3 +243,10 @@ install (CODE "MESSAGE(\"sudo update-menus\")")
|
||||
install (CODE "MESSAGE(\"sudo update-mime-database /usr/share/mime/\")")
|
||||
install (CODE "MESSAGE(\"sudo gtk-update-icon-cache /usr/share/icons/hicolor/\")")
|
||||
install (CODE "MESSAGE(\"NB: Your paths may vary.\")")
|
||||
|
||||
endif() # if(ENABLE_QRENDERDOC)
|
||||
|
||||
# Build python modules - primarily used for constructing documentation
|
||||
if(ENABLE_PYRENDERDOC AND UNIX AND NOT APPLE)
|
||||
add_subdirectory(Code/pyrenderdoc)
|
||||
endif()
|
||||
|
||||
@@ -78,8 +78,8 @@ set_target_properties(_renderdoc PROPERTIES PREFIX "")
|
||||
set_target_properties(_qrenderdoc PROPERTIES PREFIX "")
|
||||
|
||||
# Make sure we build after the wrappers are generated
|
||||
add_dependencies(_renderdoc build-qrenderdoc)
|
||||
add_dependencies(_qrenderdoc build-qrenderdoc)
|
||||
add_dependencies(_renderdoc swig-bindings)
|
||||
add_dependencies(_qrenderdoc swig-bindings)
|
||||
|
||||
# Copy in the .py wrappers from qrenderdoc's build
|
||||
add_custom_command(
|
||||
|
||||
Reference in New Issue
Block a user