Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake Compatibility with FetchContent #13311

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/gl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion wrappers/csharp/Intel.RealSense/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion wrappers/pcl/pcl-color/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion wrappers/pcl/pcl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions wrappers/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down