forked from qt-creator/qt-creator
On Linux (and Windows) we should not create toplevel files (README.md etc) or directories (doc/, scripts/ etc). On macOS, move the whole Devel package contents into the app bundle, because that is installed toplevel in the Qt installers, and we shouldn't even create include/, lib/ or any other directory at the toplevel at all. Since the prefix path must now point to the Resources folder inside the app bundle, adapt build_plugin.py to also accept --qtc-path pointing to the app bundle (Qt Creator.app) itself, and also to the app bundles parent directory. Adapt the Qt Creator plugin project template similarly. Task-number: QTCREATORBUG-25414 Fixes: QTCREATORBUG-25415 Change-Id: Ic756237fb920b54b1ec95d076649ad947b39a7e8 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
60 lines
2.0 KiB
CMake
60 lines
2.0 KiB
CMake
# Generate documentation
|
|
|
|
option(BUILD_DEVELOPER_DOCS "Include developer documentation" OFF)
|
|
add_feature_info("Include developer documentation" BUILD_DEVELOPER_DOCS "")
|
|
|
|
function(_find_all_includes _ret_includes _ret_framework_paths)
|
|
set(_all_includes "${PROJECT_SOURCE_DIR}/src/plugins;${PROJECT_SOURCE_DIR}/src/libs")
|
|
foreach(_target ${__QTC_PLUGINS} ${__QTC_LIBRARIES})
|
|
if (NOT TARGET ${_target})
|
|
continue()
|
|
endif()
|
|
get_target_property(_includes ${_target} INCLUDE_DIRECTORIES)
|
|
foreach(_include ${_includes})
|
|
string(FIND "${_include}" "/src/plugins/" _in_plugins)
|
|
string(FIND "${_include}" "/src/libs/" _in_libs)
|
|
string(FIND "${_include}" "${CMAKE_BINARY_DIR}" _in_build)
|
|
if(_in_plugins LESS 0 AND _in_libs LESS 0 AND _in_build LESS 0)
|
|
list(APPEND _all_includes ${_include})
|
|
endif()
|
|
endforeach()
|
|
endforeach()
|
|
list(APPEND _all_includes ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
|
|
list(REMOVE_DUPLICATES _all_includes)
|
|
set("${_ret_includes}" "${_all_includes}" PARENT_SCOPE)
|
|
|
|
# framework path
|
|
if (APPLE)
|
|
get_target_property(_qt_target Qt5::Core LOCATION) # <fw_path>/QtCore.framework/QtCore
|
|
get_filename_component(_qt_loc "${_qt_target}" DIRECTORY)
|
|
set("${_ret_framework_paths}" "${_qt_loc}/.." PARENT_SCOPE)
|
|
endif()
|
|
endfunction()
|
|
|
|
if (WITH_DOCS)
|
|
add_qtc_documentation(${IDE_DOC_FILE})
|
|
if (BUILD_DEVELOPER_DOCS)
|
|
_find_all_includes(_all_includes _framework_paths)
|
|
add_qtc_documentation("qtcreatordev/qtcreator-dev.qdocconf"
|
|
INCLUDE_DIRECTORIES ${_all_includes}
|
|
FRAMEWORK_PATHS ${_framework_paths}
|
|
)
|
|
endif()
|
|
endif()
|
|
if(WITH_ONLINE_DOCS)
|
|
add_qtc_documentation(${IDE_DOC_FILE_ONLINE})
|
|
if (BUILD_DEVELOPER_DOCS)
|
|
_find_all_includes(_all_includes _framework_paths)
|
|
add_qtc_documentation("qtcreatordev/qtcreator-dev-online.qdocconf"
|
|
INCLUDE_DIRECTORIES ${_all_includes}
|
|
FRAMEWORK_PATHS ${_framework_paths}
|
|
)
|
|
endif()
|
|
endif()
|
|
|
|
install(DIRECTORY config
|
|
DESTINATION ${IDE_HEADER_INSTALL_PATH}/doc
|
|
COMPONENT Devel
|
|
EXCLUDE_FROM_ALL
|
|
)
|