diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 083e15493c..d1b5f721ae 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS 1) #set(CMAKE_VERBOSE_MAKEFILE on) if(BUILD_GRAPHICAL_EXAMPLES) - include(${CMAKE_SOURCE_DIR}/CMake/opengl_config.cmake) + include(${PROJECT_SOURCE_DIR}/CMake/opengl_config.cmake) else() if(ANDROID_NDK_TOOLCHAIN_INCLUDED) find_library(log-lib log) diff --git a/src/gl/CMakeLists.txt b/src/gl/CMakeLists.txt index c541429c8a..acfae089af 100644 --- a/src/gl/CMakeLists.txt +++ b/src/gl/CMakeLists.txt @@ -42,7 +42,7 @@ set(REALSENSE_GL_PUBLIC_HEADERS set(CMAKECONFIG_GL_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${LRS_GL_TARGET}") -include(${CMAKE_SOURCE_DIR}/CMake/opengl_config.cmake) +include(${PROJECT_SOURCE_DIR}/CMake/opengl_config.cmake) if (${BUILD_SHARED_LIBS} AND ${BUILD_EASYLOGGINGPP}) list(APPEND REALSENSE_GL_CPP ../../third-party/easyloggingpp/src/easylogging++.cc) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index f82e58b174..b00e8fbddd 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -24,7 +24,7 @@ endif() if(BUILD_EXAMPLES) if(BUILD_GRAPHICAL_EXAMPLES) - include(${CMAKE_SOURCE_DIR}/CMake/opengl_config.cmake) + include(${PROJECT_SOURCE_DIR}/CMake/opengl_config.cmake) if (NOT BUILD_GLSL_EXTENSIONS) MESSAGE(STATUS "BUILD_GRAPHICAL_EXAMPLES explicitely depends on BUILD_GLSL_EXTENSIONS, set it ON") SET(BUILD_GLSL_EXTENSIONS ON) diff --git a/wrappers/csharp/Intel.RealSense/CMakeLists.txt b/wrappers/csharp/Intel.RealSense/CMakeLists.txt index c23a788f99..7ad9172219 100644 --- a/wrappers/csharp/Intel.RealSense/CMakeLists.txt +++ b/wrappers/csharp/Intel.RealSense/CMakeLists.txt @@ -31,7 +31,7 @@ csharp_set_designer_cs_properties( if(BUILD_UNITY_BINDINGS) string(REPLACE "/" "\\" CMAKE_BINARY_WIN_DIR ${CMAKE_BINARY_DIR}) - string(REPLACE "/" "\\" CMAKE_SOURCE_WIN_DIR ${CMAKE_SOURCE_DIR}) + string(REPLACE "/" "\\" CMAKE_SOURCE_WIN_DIR ${PROJECT_SOURCE_DIR}) file(MAKE_DIRECTORY ${CMAKE_BINARY_WIN_DIR}/wrappers) if(NOT EXISTS ${CMAKE_BINARY_WIN_DIR}/wrappers/unity) execute_process(COMMAND cmd "/C mklink /D ${CMAKE_BINARY_WIN_DIR}\\wrappers\\unity ${CMAKE_SOURCE_WIN_DIR}\\wrappers\\unity") diff --git a/wrappers/pcl/pcl-color/CMakeLists.txt b/wrappers/pcl/pcl-color/CMakeLists.txt index 9faea37631..2948dfe2e3 100644 --- a/wrappers/pcl/pcl-color/CMakeLists.txt +++ b/wrappers/pcl/pcl-color/CMakeLists.txt @@ -10,7 +10,7 @@ link_directories(${PCL_LIBRARY_DIRS}) add_definitions(${PCL_DEFINITIONS}) target_link_libraries(rs-pcl-color ${DEPENDENCIES} ${PCL_COMMON_LIBRARIES} ${PCL_IO_LIBRARIES}) if(NOT glfw3_DIR) - target_include_directories(rs-pcl-color PUBLIC "${CMAKE_SOURCE_DIR}third-party/glfw/include") + target_include_directories(rs-pcl-color PUBLIC "${PROJECT_SOURCE_DIR}third-party/glfw/include") target_link_directories(rs-pcl-color PUBLIC "${CMAKE_BINARY_DIR}/third-party/glfw/src/${CMAKE_BUILD_TYPE}") endif() diff --git a/wrappers/pcl/pcl/CMakeLists.txt b/wrappers/pcl/pcl/CMakeLists.txt index 80af1cfd16..62e862220f 100644 --- a/wrappers/pcl/pcl/CMakeLists.txt +++ b/wrappers/pcl/pcl/CMakeLists.txt @@ -6,7 +6,7 @@ add_executable(rs-pcl rs-pcl.cpp) set_property(TARGET rs-pcl PROPERTY CXX_STANDARD 11) target_link_libraries(rs-pcl ${DEPENDENCIES}) if(NOT glfw3_DIR) - target_include_directories(rs-pcl PUBLIC "${CMAKE_SOURCE_DIR}/third-party/glfw/include") + target_include_directories(rs-pcl PUBLIC "${PROJECT_SOURCE_DIR}/third-party/glfw/include") target_link_directories(rs-pcl PUBLIC "${CMAKE_BINARY_DIR}/third-party/glfw/src/${CMAKE_BUILD_TYPE}") endif() set_target_properties (rs-pcl PROPERTIES diff --git a/wrappers/python/CMakeLists.txt b/wrappers/python/CMakeLists.txt index a14bf47545..eae4016c2d 100644 --- a/wrappers/python/CMakeLists.txt +++ b/wrappers/python/CMakeLists.txt @@ -140,11 +140,11 @@ set_target_properties( pybackend2 PROPERTIES FOLDER Library/Python ) -target_include_directories(pybackend2 PRIVATE ${CMAKE_SOURCE_DIR}/include) +target_include_directories(pybackend2 PRIVATE ${PROJECT_SOURCE_DIR}/include) if(${FORCE_RSUSB_BACKEND}) if(APPLE) - target_include_directories(pybackend2 PRIVATE ${CMAKE_SOURCE_DIR}/third-party/hidapi/) + target_include_directories(pybackend2 PRIVATE ${PROJECT_SOURCE_DIR}/third-party/hidapi/) endif() endif()