Skip to content
Merged
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
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# Copyright (C) CERN for the benefit of the SHiP Collaboration

cmake_minimum_required(VERSION 3.16)
include(GNUInstallDirs)

project(
SHiPGeometry
Expand All @@ -23,6 +22,13 @@ find_package(GeoModelCore REQUIRED)
find_package(GeoModelIO REQUIRED)
find_package(GeoModelTools REQUIRED)
find_package(SQLite3 REQUIRED)
# Compatibility shim recommended by CMake's FindSQLite3 docs: older CMake
# (< 4.3) only defines SQLite::SQLite3; newer CMake defines SQLite3::SQLite3
# and marks the old name deprecated. Adding the alias lets us use the new
# canonical name unconditionally.
if(NOT TARGET SQLite3::SQLite3)
add_library(SQLite3::SQLite3 ALIAS SQLite::SQLite3)
endif()

# Testing
include(CTest)
Expand Down
2 changes: 1 addition & 1 deletion apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ target_link_libraries(
)

add_executable(validate_geometry validate_geometry.cpp)
target_link_libraries(validate_geometry PRIVATE SQLite::SQLite3)
target_link_libraries(validate_geometry PRIVATE SQLite3::SQLite3)

include(GNUInstallDirs)
install(
Expand Down