Fixes for being used as a subproject

* Don't use CMAKE_SOURCE_DIR, always use CMAKE_CURRENT_SOURCE_DIR
* -Werror=undef found that #if was used instead of #ifdef
This commit is contained in:
David Faure
2020-11-23 21:16:40 +01:00
parent dc328ff7c4
commit 77016a619f
5 changed files with 5 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ add_custom_command(
OUTPUT ${DOXYGEN_OUTPUT_DIR}/qch/kddockwidgets-api.qch
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
#handle a bug in doxygen where image files referred to in markdown are not copied the output
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/screencap.gif ${DOXYGEN_OUTPUT_DIR}/html
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/../../screencap.gif ${DOXYGEN_OUTPUT_DIR}/html
DEPENDS ${_dox_deps} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)