Skip to content

Commit

Permalink
only used built in version of Cephes since there doesn't seem to be a…
Browse files Browse the repository at this point in the history
…n easy packaged version
  • Loading branch information
varunagrawal committed Dec 29, 2023
1 parent e0b8c52 commit ba93dec
Showing 1 changed file with 4 additions and 29 deletions.
33 changes: 4 additions & 29 deletions cmake/HandleCephes.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,13 @@
# For both system or bundle version, a cmake target "cephes-gtsam-if" is defined
# (interface library)

option(
GTSAM_USE_SYSTEM_CEPHES
"Find and use system-installed cephes. If 'off', use the one bundled with GTSAM"
OFF)

if(GTSAM_USE_SYSTEM_CEPHES)
# # Debian package: libmetis-dev
add_subdirectory(${GTSAM_SOURCE_DIR}/gtsam/3rdparty/cephes)

# find_path(METIS_INCLUDE_DIR metis.h REQUIRED) find_library(METIS_LIBRARY
# metis REQUIRED)
list(APPEND GTSAM_EXPORTED_TARGETS cephes-gtsam)

# if(METIS_INCLUDE_DIR AND METIS_LIBRARY) mark_as_advanced(METIS_INCLUDE_DIR)
# mark_as_advanced(METIS_LIBRARY)

# add_library(cephes-gtsam-if INTERFACE)
# target_include_directories(cephes-gtsam-if BEFORE INTERFACE
# ${METIS_INCLUDE_DIR} # gtsam_unstable/partition/FindSeparator-inl.h uses
# internal metislib.h API # via extern "C"
# $<BUILD_INTERFACE:${GTSAM_SOURCE_DIR}/gtsam/3rdparty/metis/libmetis>
# $<BUILD_INTERFACE:${GTSAM_SOURCE_DIR}/gtsam/3rdparty/metis/GKlib> )
# target_link_libraries(cephes-gtsam-if INTERFACE ${METIS_LIBRARY}) endif()

else()
# Bundled version:
add_subdirectory(${GTSAM_SOURCE_DIR}/gtsam/3rdparty/cephes)

list(APPEND GTSAM_EXPORTED_TARGETS cephes-gtsam)

add_library(cephes-gtsam-if INTERFACE)
target_link_libraries(cephes-gtsam-if INTERFACE cephes-gtsam)

endif()
add_library(cephes-gtsam-if INTERFACE)
target_link_libraries(cephes-gtsam-if INTERFACE cephes-gtsam)

list(APPEND GTSAM_EXPORTED_TARGETS cephes-gtsam-if)
install(
Expand Down

0 comments on commit ba93dec

Please sign in to comment.