automerge/rust/automerge-c/cmake/automerge-c-config.cmake.in
Alex Good dd3c6d1303
Move rust workspace into ./rust
After some discussion with PVH I realise that the repo structure in the
last reorg was very rust-centric. In an attempt to put each language on
a level footing move the rust code and project files into ./rust
2022-10-16 19:55:51 +01:00

99 lines
3.7 KiB
CMake

@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_dependency(Threads)
find_library(@SYMBOL_PREFIX@_IMPLIB_DEBUG @LIBRARY_NAME@${CMAKE_DEBUG_POSTFIX} PATHS "${PACKAGE_PREFIX_DIR}/debug/${CMAKE_INSTALL_LIBDIR}" "${PACKAGE_PREFIX_DIR}/${CMAKE_INSTALL_LIBDIR}" NO_DEFAULT_PATH)
find_library(@SYMBOL_PREFIX@_IMPLIB_RELEASE @LIBRARY_NAME@${CMAKE_RELEASE_POSTFIX} PATHS "${PACKAGE_PREFIX_DIR}/${CMAKE_INSTALL_LIBDIR}" NO_DEFAULT_PATH)
find_file(@SYMBOL_PREFIX@_LOCATION_DEBUG "${CMAKE_SHARED_LIBRARY_PREFIX}@LIBRARY_NAME@${CMAKE_DEBUG_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}" PATHS "${PACKAGE_PREFIX_DIR}/debug/${CMAKE_INSTALL_BINDIR}" "${PACKAGE_PREFIX_DIR}/${CMAKE_INSTALL_LIBDIR}" NO_DEFAULT_PATH)
find_file(@SYMBOL_PREFIX@_LOCATION_RELEASE "${CMAKE_SHARED_LIBRARY_PREFIX}@LIBRARY_NAME@${CMAKE_RELEASE_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}" PATHS "${PACKAGE_PREFIX_DIR}/${CMAKE_INSTALL_BINDIR}" NO_DEFAULT_PATH)
if(@BUILD_SHARED_LIBS@)
set(@SYMBOL_PREFIX@_DEFINE_SYMBOL "@SYMBOL_PREFIX@_EXPORTS")
if(WIN32)
set(@SYMBOL_PREFIX@_NO_SONAME_DEBUG "TRUE")
set(@SYMBOL_PREFIX@_NO_SONAME_RELEASE "TRUE")
set(@SYMBOL_PREFIX@_SONAME_DEBUG "")
set(@SYMBOL_PREFIX@_SONAME_RELEASE "")
else()
set(@SYMBOL_PREFIX@_NO_SONAME_DEBUG "FALSE")
set(@SYMBOL_PREFIX@_NO_SONAME_RELEASE "FALSE")
get_filename_component(@SYMBOL_PREFIX@_SONAME_DEBUG "${@SYMBOL_PREFIX@_LOCATION_DEBUG}" NAME)
get_filename_component(@SYMBOL_PREFIX@_SONAME_RELEASE "${@SYMBOL_PREFIX@_LOCATION_RELEASE}" NAME)
endif()
set(@SYMBOL_PREFIX@_TYPE "SHARED")
else()
set(@SYMBOL_PREFIX@_DEFINE_SYMBOL "")
set(@SYMBOL_PREFIX@_LOCATION_DEBUG "${@SYMBOL_PREFIX@_IMPLIB_DEBUG}")
set(@SYMBOL_PREFIX@_IMPLIB_DEBUG "")
set(@SYMBOL_PREFIX@_LOCATION_RELEASE "${@SYMBOL_PREFIX@_IMPLIB_RELEASE}")
set(@SYMBOL_PREFIX@_IMPLIB_RELEASE "")
set(@SYMBOL_PREFIX@_NO_SONAME_DEBUG "TRUE")
set(@SYMBOL_PREFIX@_NO_SONAME_RELEASE "TRUE")
set(@SYMBOL_PREFIX@_SONAME_DEBUG "")
set(@SYMBOL_PREFIX@_SONAME_RELEASE "")
set(@SYMBOL_PREFIX@_TYPE "STATIC")
endif()
add_library(@NAMESPACE@@PROJECT_NAME@ ${@SYMBOL_PREFIX@_TYPE} IMPORTED)
set_target_properties(
@NAMESPACE@@PROJECT_NAME@
PROPERTIES
# \note Cargo writes a debug build into a nested directory instead of
# decorating its name.
DEBUG_POSTFIX ""
DEFINE_SYMBOL "${@SYMBOL_PREFIX@_DEFINE_SYMBOL}"
IMPORTED_CONFIGURATIONS "RELEASE;DEBUG"
IMPORTED_IMPLIB_DEBUG "${@SYMBOL_PREFIX@_IMPLIB_DEBUG}"
IMPORTED_IMPLIB_RELEASE "${@SYMBOL_PREFIX@_IMPLIB_RELEASE}"
IMPORTED_LOCATION_DEBUG "${@SYMBOL_PREFIX@_LOCATION_DEBUG}"
IMPORTED_LOCATION_RELEASE "${@SYMBOL_PREFIX@_LOCATION_RELEASE}"
IMPORTED_NO_SONAME_DEBUG "${@SYMBOL_PREFIX@_NO_SONAME_DEBUG}"
IMPORTED_NO_SONAME_RELEASE "${@SYMBOL_PREFIX@_NO_SONAME_RELEASE}"
IMPORTED_SONAME_DEBUG "${@SYMBOL_PREFIX@_SONAME_DEBUG}"
IMPORTED_SONAME_RELEASE "${@SYMBOL_PREFIX@_SONAME_RELEASE}"
INTERFACE_INCLUDE_DIRECTORIES "${PACKAGE_PREFIX_DIR}/${CMAKE_INSTALL_INCLUDEDIR}"
LINKER_LANGUAGE C
PUBLIC_HEADER "${PACKAGE_PREFIX_DIR}/${CMAKE_INSTALL_INCLUDEDIR}/@PROJECT_NAME@/@LIBRARY_NAME@.h"
SOVERSION "@PROJECT_VERSION_MAJOR@"
VERSION "@PROJECT_VERSION@"
# \note Cargo exports all of the symbols automatically.
WINDOWS_EXPORT_ALL_SYMBOLS "TRUE"
)
# Remove the variables that the find_* command calls cached.
unset(@SYMBOL_PREFIX@_IMPLIB_DEBUG CACHE)
unset(@SYMBOL_PREFIX@_IMPLIB_RELEASE CACHE)
unset(@SYMBOL_PREFIX@_LOCATION_DEBUG CACHE)
unset(@SYMBOL_PREFIX@_LOCATION_RELEASE CACHE)
check_required_components(@PROJECT_NAME@)