Skip to content

Commit 2c0bf64

Browse files
authored
Using updated cspice (#103)
* working with new cspice * update changelog * Update CMakeLists.txt * fix tests
1 parent a786c38 commit 2c0bf64

File tree

4 files changed

+11
-27
lines changed

4 files changed

+11
-27
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ release.
4040
### Changed
4141
- Refactored FastAPI models and added OpenAPI examples [#96](https://github.com/DOI-USGS/SpiceQL/pull/96)
4242
- Pinned cspice to 67 [#102](https://github.com/DOI-USGS/SpiceQL/pull/102)
43+
- Update cmake files to accommodate new cspice package that uses the new cmake recipe [#103](https://github.com/DOI-USGS/SpiceQL/pull/103)
4344

4445
### Added
4546
- Added relative kernel path support for furnishing [#100](https://github.com/DOI-USGS/SpiceQL/pull/100)

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ if(SPICEQL_BUILD_LIB)
5555
add_subdirectory("submodules/gularkfilesystem")
5656
add_subdirectory("submodules/json")
5757

58-
find_package(CSpice REQUIRED)
58+
find_package(cspice REQUIRED)
5959
find_package(fmt REQUIRED)
6060
find_package(cereal REQUIRED)
6161
find_package(spdlog REQUIRED)
@@ -136,22 +136,25 @@ if(SPICEQL_BUILD_LIB)
136136

137137
target_compile_definitions(SpiceQL PRIVATE SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE
138138
PUBLIC -D_SOURCE_PREFIX="${CMAKE_CURRENT_SOURCE_DIR}")
139-
139+
140+
get_target_property(CSPICE_INCLUDE_DIRS CSPICE::cspice INTERFACE_INCLUDE_DIRECTORIES)
141+
140142
target_include_directories(SpiceQL
141143
PUBLIC
142144
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/include>
143145
$<INSTALL_INTERFACE:include>
144146
PRIVATE
145147
${CMAKE_CURRENT_SOURCE_DIR}/submodules/BTree/include/
146148
cereal
149+
${CSPICE_INCLUDE_DIRS}
147150
)
148151

149152
target_link_libraries(SpiceQL
150153
PUBLIC
151154
fmt::fmt-header-only
152155
nlohmann_json::nlohmann_json
153156
PRIVATE
154-
cspice
157+
CSPICE::cspice
155158
spdlog::spdlog_header_only
156159
HighFive
157160
${CURL_LIBRARIES}

SpiceQL/tests/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.10)
33
# A lot of linux OSes do not support C++20
44
set(CMAKE_CXX_STANDARD 20)
55

6-
find_package(CSpice REQUIRED)
6+
find_package(cspice REQUIRED)
77

88
get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
99
foreach(dir ${dirs})
@@ -30,7 +30,7 @@ target_compile_definitions(runSpiceQLTests PUBLIC SPDLOG_ACTIVE_LEVEL=SPDLOG_LEV
3030
target_link_libraries(runSpiceQLTests
3131
PRIVATE
3232
SpiceQL
33-
cspice
33+
CSPICE::cspice
3434
gtest
3535
gmock
3636
Threads::Threads
@@ -40,6 +40,7 @@ target_link_libraries(runSpiceQLTests
4040

4141

4242
target_include_directories(runSpiceQLTests PRIVATE ${CMAKE_SOURCE_DIR}/submodules/hippomocks/
43-
${CMAKE_SOURCE_DIR}/submodules/BTree/include/)
43+
${CMAKE_SOURCE_DIR}/submodules/BTree/include/
44+
${CSPICE_INCLUDE_DIRS})
4445

4546
gtest_discover_tests(runSpiceQLTests WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/SpiceQL/tests/)

cmake/FindCSpice.cmake

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)