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:
@@ -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}
|
||||
)
|
||||
|
||||
@@ -81,7 +81,7 @@ WindowBeingDragged::WindowBeingDragged(Draggable *draggable)
|
||||
}
|
||||
}
|
||||
|
||||
#if DOCKS_DEVELOPER_MODE
|
||||
#ifdef DOCKS_DEVELOPER_MODE
|
||||
|
||||
// Just used by tests
|
||||
WindowBeingDragged::WindowBeingDragged(FloatingWindow *fw)
|
||||
|
||||
@@ -32,7 +32,7 @@ struct DOCKS_EXPORT_FOR_UNIT_TESTS WindowBeingDragged
|
||||
public:
|
||||
explicit WindowBeingDragged(FloatingWindow *fw, Draggable *draggable);
|
||||
|
||||
#if DOCKS_DEVELOPER_MODE
|
||||
#ifdef DOCKS_DEVELOPER_MODE
|
||||
// For tests.
|
||||
explicit WindowBeingDragged(FloatingWindow *fw);
|
||||
#endif
|
||||
|
||||
@@ -94,7 +94,7 @@ endif()
|
||||
target_include_directories(kddockwidgets_multisplitter
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@ if(POLICY CMP0043)
|
||||
cmake_policy(SET CMP0043 NEW)
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR}/src)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../src)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
set(TESTING_SRCS utils.cpp Testing.cpp)
|
||||
|
||||
Reference in New Issue
Block a user