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
26 changes: 13 additions & 13 deletions sqlite3_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
cmake_minimum_required(VERSION 3.5)
project(sqlite3_vendor)

list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
find_package(SQLite3)
find_package(ament_cmake REQUIRED)

option(FORCE_BUILD_VENDOR_PKG
"Build SQLite3 from source, even if system-installed package is available"
OFF)

if(NOT FORCE_BUILD_VENDOR_PKG)
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
find_package(SQLite3 QUIET)
endif()

if (NOT SQLite3_FOUND)
set(extra_cmake_args)
Expand Down Expand Up @@ -30,16 +38,8 @@ else ()
message(STATUS "Found SQLite3. Using SQLite3 from system.")
endif ()

configure_file(sqlite3_vendorConfig.cmake.in "${PROJECT_BINARY_DIR}/sqlite3_vendorConfig.cmake" @ONLY)
configure_file(sqlite3_vendorConfig-version.cmake.in "${PROJECT_BINARY_DIR}/sqlite3_vendorConfig-version.cmake" @ONLY)

install(DIRECTORY cmake DESTINATION share/${PROJECT_NAME})

install(FILES
package.xml
DESTINATION share/${PROJECT_NAME})

install(FILES
"${PROJECT_BINARY_DIR}/sqlite3_vendorConfig.cmake"
"${PROJECT_BINARY_DIR}/sqlite3_vendorConfig-version.cmake"
DESTINATION share/${PROJECT_NAME}/cmake)
ament_package(
CONFIG_EXTRAS "sqlite3_vendor-extras.cmake"
)
4 changes: 2 additions & 2 deletions sqlite3_vendor/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
<maintainer email="ros-tooling@googlegroups.com">ROS Tooling Working Group</maintainer>
<license>Apache License 2.0</license>

<buildtool_depend>cmake</buildtool_depend>
<buildtool_depend>ament_cmake</buildtool_depend>

<depend>libsqlite3-dev</depend>

<export>
<build_type>cmake</build_type>
<build_type>ament_cmake</build_type>
</export>
</package>
15 changes: 15 additions & 0 deletions sqlite3_vendor/sqlite3_vendor-extras.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2019 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

list(INSERT CMAKE_MODULE_PATH 0 "${sqlite3_vendor_DIR}/Modules")
13 changes: 0 additions & 13 deletions sqlite3_vendor/sqlite3_vendorConfig-version.cmake.in

This file was deleted.

13 changes: 0 additions & 13 deletions sqlite3_vendor/sqlite3_vendorConfig.cmake.in

This file was deleted.