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

CMakeLists.txt: don't include CERES_INCLUDE_DIRS if it's empty or not set #1808

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,12 @@ target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC
"${EIGEN3_INCLUDE_DIR}")
target_link_libraries(${PROJECT_NAME} PUBLIC ${EIGEN3_LIBRARIES})

target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC
"${CERES_INCLUDE_DIRS}")
if (CERES_INCLUDE_DIRS AND NOT "${CERES_INCLUDE_DIRS}" STREQUAL "")
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC
"${CERES_INCLUDE_DIRS}")
else()
message(STATUS "Not including CERES_INCLUDE_DIRS, because it's not set or empty, see http://ceres-solver.org/installation.html#using-ceres-with-cmake Ceres: CERES_INCLUDE_DIRS: '${CERES_INCLUDE_DIRS}' CERES_INCLUDE_DIR '${CERES_INCLUDE_DIR}'")
endif()
target_link_libraries(${PROJECT_NAME} PUBLIC ${CERES_LIBRARIES})

target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC
Expand Down