Skip to content

Commit acc2e88

Browse files
committed
Only allow use of sqlite system package on Linux for now
Signed-off-by: Nicholas Frizzell <[email protected]>
1 parent 9e95734 commit acc2e88

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed
File renamed without changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#
2+
# Copyright (c) Contributors to the Open 3D Engine Project.
3+
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
4+
#
5+
# SPDX-License-Identifier: Apache-2.0 OR MIT
6+
#
7+
#
8+
9+
# this file actually ingests the library and defines targets.
10+
set(TARGET_WITH_NAMESPACE "3rdParty::SQLite")
11+
if (TARGET ${TARGET_WITH_NAMESPACE})
12+
return()
13+
endif()
14+
15+
set(MY_NAME "SQLite")
16+
17+
18+
set(${MY_NAME}_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/SQLite)
19+
set(${MY_NAME}_LIBS_DIR ${CMAKE_CURRENT_LIST_DIR}/SQLite/lib)
20+
set(${MY_NAME}_LIBRARY ${${MY_NAME}_LIBS_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}sqlite3${CMAKE_STATIC_LIBRARY_SUFFIX})
21+
22+
add_library(${TARGET_WITH_NAMESPACE} STATIC IMPORTED GLOBAL)
23+
24+
set_target_properties(${TARGET_WITH_NAMESPACE} PROPERTIES IMPORTED_LOCATION "${${MY_NAME}_LIBRARY}")
25+
26+
ly_target_include_system_directories(TARGET ${TARGET_WITH_NAMESPACE} INTERFACE ${${MY_NAME}_INCLUDE_DIR})
27+
28+
target_link_libraries(${TARGET_WITH_NAMESPACE}
29+
INTERFACE ${CMAKE_DL_LIBS})
30+
31+
set(${MY_NAME}_FOUND True)

package-system/sqlite/build_config.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"package_url":"https://www.sqlite.org",
66
"package_license":"CUSTOM",
77
"package_license_file":"copyright.txt",
8-
"cmake_find_source":"FindSQLite.cmake",
98
"cmake_find_target":"FindSQLite.cmake",
109
"additional_src_files":[
1110
"copyright.txt"
1211
],
1312
"Platforms":{
1413
"Windows":{
1514
"Windows":{
15+
"cmake_find_source":"FindSQLite.cmake.NonLinux",
1616
"package_version":"3.37.2-rev1",
1717
"custom_build_cmd": [
1818
"build_windows.cmd"
@@ -24,6 +24,7 @@
2424
},
2525
"Darwin":{
2626
"Mac":{
27+
"cmake_find_source":"FindSQLite.cmake.NonLinux",
2728
"package_version":"3.37.2-rev2",
2829
"custom_build_cmd": [
2930
"./build_unix_like.sh"
@@ -35,6 +36,7 @@
3536
},
3637
"Linux":{
3738
"Linux":{
39+
"cmake_find_source":"FindSQLite.cmake.Linux",
3840
"package_version":"3.37.2-rev1",
3941
"custom_build_cmd": [
4042
"./build_unix_like.sh"

0 commit comments

Comments
 (0)