Add ParserConfig.cmake

This commit is contained in:
sunwen
2024-06-18 16:10:03 +08:00
parent 7719bfc09e
commit 55c6d4b97c

17
cmake/ParserConfig.cmake Normal file
View File

@@ -0,0 +1,17 @@
set(Parser_MAJOR_VERSION 1)
set(Parser_MINOR_VERSION 0)
set(Parser_BUILD_VERSION 0)
get_filename_component(Parser_DIR "${CMAKE_CURRENT_LIST_DIR}/" PATH)
set(Parser_INCLUDE_DIRS "${Parser_DIR}/include/" "${Parser_DIR}/include/Parser/")
add_library(Parser SHARED IMPORTED)
set_target_properties(Parser PROPERTIES IMPORTED_LOCATION "${Parser_DIR}/bin/libParser.so")
add_library(sqlite3 SHARED IMPORTED)
set_property(TARGET sqlite3 APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(sqlite3 PROPERTIES IMPORTED_LOCATION_DEBUG "${Parser_DIR}/bin/libsqlite3.so.0")
add_library(matio SHARED IMPORTED)
set_property(TARGET matio APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(matio PROPERTIES IMPORTED_LOCATION_DEBUG "${Parser_DIR}/bin/libmatio.so.11")
#set(Parser_Libraries Parser matio sqlite3)
set(Parser_FOUND TRUE)