Initial commit
This commit is contained in:
21
sqlite3/all/cmake/SQLite3CLITargets.cmake
Normal file
21
sqlite3/all/cmake/SQLite3CLITargets.cmake
Normal file
@@ -0,0 +1,21 @@
|
||||
if(NOT TARGET SQLite::SQLite3CLI)
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
find_program(SQLITE3_EXECUTABLE
|
||||
NAMES sqlite3
|
||||
PATHS ENV PATH
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
else()
|
||||
find_program(SQLITE3_EXECUTABLE
|
||||
NAMES sqlite3
|
||||
PATHS "${CMAKE_CURRENT_LIST_DIR}/../../bin/"
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
endif()
|
||||
|
||||
if(SQLITE3_EXECUTABLE)
|
||||
get_filename_component(SQLITE3_EXECUTABLE "${SQLITE3_EXECUTABLE}" ABSOLUTE)
|
||||
add_executable(SQLite::SQLite3CLI IMPORTED)
|
||||
set_property(TARGET SQLite::SQLite3CLI PROPERTY IMPORTED_LOCATION ${SQLITE3_EXECUTABLE})
|
||||
endif()
|
||||
endif()
|
||||
Reference in New Issue
Block a user