[cmake] Update for vcpkg-provided cspice
parent
16051ed90a
commit
00ee0d4bcd
|
@ -122,6 +122,8 @@ if(ENABLE_SPICE)
|
||||||
include_directories(${SPICE_INCLUDE_DIR})
|
include_directories(${SPICE_INCLUDE_DIR})
|
||||||
message(STATUS "Spice include directories: ${SPICE_INCLUDE_DIR}")
|
message(STATUS "Spice include directories: ${SPICE_INCLUDE_DIR}")
|
||||||
add_library(CSPICE::CSPICE ALIAS Spice)
|
add_library(CSPICE::CSPICE ALIAS Spice)
|
||||||
|
else()
|
||||||
|
include_directories(${CSPICE_INCLUDE_DIR})
|
||||||
endif()
|
endif()
|
||||||
add_definitions(-DUSE_SPICE)
|
add_definitions(-DUSE_SPICE)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -21,13 +21,16 @@
|
||||||
|
|
||||||
# Find include directory
|
# Find include directory
|
||||||
find_path(CSPICE_INCLUDE_DIR
|
find_path(CSPICE_INCLUDE_DIR
|
||||||
NAMES "SpiceOsc.h"
|
NAMES "SpiceUsr.h"
|
||||||
|
HINTS CSPICE_DIR
|
||||||
|
PATH_SUFFIXES "include" "include/cspice"
|
||||||
DOC "cspice include directory")
|
DOC "cspice include directory")
|
||||||
mark_as_advanced(CSPICE_INCLUDE_DIR)
|
mark_as_advanced(CSPICE_INCLUDE_DIR)
|
||||||
|
|
||||||
# Find CSPICE library
|
# Find CSPICE library
|
||||||
find_library(CSPICE_LIBRARY
|
find_library(CSPICE_LIBRARY
|
||||||
NAMES "cspice" "libcspice" "cspice.a"
|
NAMES "cspice" "libcspice" "cspice.a"
|
||||||
|
HINTS CSPICE_DIR
|
||||||
DOC "cspice libraries")
|
DOC "cspice libraries")
|
||||||
mark_as_advanced(CSPICE_LIBRARY)
|
mark_as_advanced(CSPICE_LIBRARY)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue