dino/qlite/CMakeLists.txt

44 lines
1.1 KiB
Text
Raw Normal View History

find_packages(QLITE_PACKAGES REQUIRED
Gee
GLib
GObject
2020-06-10 21:40:00 +00:00
SQLite3>=3.24
2017-03-02 14:37:32 +00:00
)
vala_precompile(QLITE_VALA_C
SOURCES
"src/database.vala"
"src/table.vala"
"src/column.vala"
"src/row.vala"
"src/statement_builder.vala"
2017-08-25 22:05:36 +00:00
"src/delete_builder.vala"
2017-03-02 14:37:32 +00:00
"src/insert_builder.vala"
2017-08-25 22:05:36 +00:00
"src/query_builder.vala"
2017-03-02 14:37:32 +00:00
"src/update_builder.vala"
2017-08-25 22:05:36 +00:00
"src/upsert_builder.vala"
2017-03-02 14:37:32 +00:00
PACKAGES
${QLITE_PACKAGES}
GENERATE_VAPI
qlite
GENERATE_HEADER
qlite
)
add_custom_target(qlite-vapi
DEPENDS
${CMAKE_BINARY_DIR}/exports/qlite.vapi
${CMAKE_BINARY_DIR}/exports/qlite.deps
2017-03-02 14:37:32 +00:00
)
add_definitions(${VALA_CFLAGS})
add_library(qlite SHARED ${QLITE_VALA_C})
add_dependencies(qlite qlite-vapi)
target_link_libraries(qlite ${QLITE_PACKAGES})
set_target_properties(qlite PROPERTIES VERSION 0.1 SOVERSION 0)
install(TARGETS qlite ${TARGET_INSTALL})
install(FILES ${CMAKE_BINARY_DIR}/exports/qlite.vapi ${CMAKE_BINARY_DIR}/exports/qlite.deps DESTINATION ${VAPI_INSTALL_DIR})
install(FILES ${CMAKE_BINARY_DIR}/exports/qlite.h DESTINATION ${INCLUDE_INSTALL_DIR})