зеркало из https://github.com/microsoft/vcpkg.git
more odb-sqlite
This commit is contained in:
Родитель
2aa034bf47
Коммит
8de99463fa
|
@ -7,25 +7,25 @@ file(GLOB_RECURSE libodb_src LIST_DIRECTORIES False
|
||||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
*.cxx)
|
*.cxx)
|
||||||
list(FILTER libodb_src EXCLUDE REGEX /posix/.*)
|
list(FILTER libodb_src EXCLUDE REGEX /posix/.*)
|
||||||
add_library(sqlite ${libodb_src})
|
add_library(libodb-sqlite ${libodb_src})
|
||||||
target_include_directories(sqlite
|
target_include_directories(libodb-sqlite
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(sqlite PRIVATE odb::libodb sqlite3)
|
target_link_libraries(libodb-sqlite PRIVATE odb::libodb sqlite3)
|
||||||
if(BUILD_SHARED_LIBS)
|
if(BUILD_SHARED_LIBS)
|
||||||
target_compile_definitions(sqlite PRIVATE
|
target_compile_definitions(libodb-sqlite PRIVATE
|
||||||
-DLIBODB_SQLITE_DYNAMIC_LIB
|
-DLIBODB_SQLITE_DYNAMIC_LIB
|
||||||
-DLIBODB_SQLITE_HAVE_UNLOCK_NOTIFY)
|
-DLIBODB_SQLITE_HAVE_UNLOCK_NOTIFY)
|
||||||
else()
|
else()
|
||||||
target_compile_definitions(sqlite PRIVATE
|
target_compile_definitions(libodb-sqlite PRIVATE
|
||||||
-DLIBODB_SQLITE_STATIC_LIB
|
-DLIBODB_SQLITE_STATIC_LIB
|
||||||
-DLIBODB_SQLITE_HAVE_UNLOCK_NOTIFY)
|
-DLIBODB_SQLITE_HAVE_UNLOCK_NOTIFY)
|
||||||
endif()
|
endif()
|
||||||
install(TARGETS sqlite EXPORT odb_sqliteConfig
|
install(TARGETS libodb-sqlite EXPORT odb_sqliteConfig
|
||||||
COMPONENT sqlite
|
COMPONENT sqlite
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION lib
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
|
@ -42,4 +42,4 @@ install(DIRECTORY odb DESTINATION include/
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
install(EXPORT odb_sqliteConfig NAMESPACE odb:: COMPONENT sqlite DESTINATION share/odb)
|
install(EXPORT odb_sqliteConfig NAMESPACE odb:: COMPONENT sqlite DESTINATION share/odb)
|
||||||
export(TARGETS sqlite NAMESPACE odb:: FILE odb_sqliteConfig.cmake)
|
export(TARGETS libodb-sqlite NAMESPACE odb:: FILE odb_sqliteConfig.cmake)
|
|
@ -25,5 +25,10 @@ vcpkg_configure_cmake(
|
||||||
vcpkg_build_cmake()
|
vcpkg_build_cmake()
|
||||||
vcpkg_install_cmake()
|
vcpkg_install_cmake()
|
||||||
|
|
||||||
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libodb)
|
file(READ ${CURRENT_PACKAGES_DIR}/debug/share/odb/odb_sqliteConfig-debug.cmake LIBODB_DEBUG_TARGETS)
|
||||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libodb/LICENSE ${CURRENT_PACKAGES_DIR}/share/libodb/copyright)
|
string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" LIBODB_DEBUG_TARGETS "${LIBODB_DEBUG_TARGETS}")
|
||||||
|
file(WRITE ${CURRENT_PACKAGES_DIR}/share/odb/odb_sqliteConfig-debug.cmake "${LIBODB_DEBUG_TARGETS}")
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||||
|
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libodb-sqlite)
|
||||||
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libodb-sqlite/LICENSE ${CURRENT_PACKAGES_DIR}/share/libodb-sqlite/copyright)
|
||||||
|
vcpkg_copy_pdbs()
|
Загрузка…
Ссылка в новой задаче