17 lines
638 B
CMake
17 lines
638 B
CMake
|
find_path(libdeltachat_INCLUDE_DIR deltachat.h)
|
||
|
mark_as_advanced(libdeltachat_INCLUDE_DIR)
|
||
|
|
||
|
find_library(libdeltachat_LIBRARY deltachat)
|
||
|
mark_as_advanced(libdeltachat_LIBRARY)
|
||
|
|
||
|
include(FindPackageHandleStandardArgs)
|
||
|
find_package_handle_standard_args(
|
||
|
deltachat-core DEFAULT_MSG libdeltachat_LIBRARY libdeltachat_INCLUDE_DIR)
|
||
|
|
||
|
if(deltachat-core_FOUND AND NOT TARGET deltachat-core::libdeltachat)
|
||
|
add_library(deltachat-core::libdeltachat SHARED IMPORTED)
|
||
|
set_target_properties(deltachat-core::libdeltachat PROPERTIES
|
||
|
IMPORTED_LOCATION ${libdeltachat_LIBRARY}
|
||
|
INTERFACE_INCLUDE_DIRECTORIES ${libdeltachat_INCLUDE_DIR})
|
||
|
endif()
|