summaryrefslogtreecommitdiffstats
path: root/cmake/CMakeLists.txt
blob: fd94154b76653eb5225212c91935bba1c36af89b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)

write_basic_package_version_file("${PROJECT_NAME}ConfigVersion.cmake"
  VERSION ${PACKAGE_VERSION}
  COMPATIBILITY SameMajorVersion)

configure_file("${PROJECT_NAME}Config.cmake.in"
  "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" @ONLY)

install(EXPORT ${PROJECT_NAME}Targets
  FILE "${PROJECT_NAME}Targets.cmake"
  NAMESPACE "${PROJECT_NAME}::"
  DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")

install(FILES
  "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
  "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
  DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
cessary. * * Parameters * size max number of cache files * path directory used to store cache files * key the key used to lookup cache files * ttl max cache time in seconds for this key * fn content generator function for this key * cbdata user-supplied data to the content generator function * * Return value * 0 indicates success, everyting else is an error */ extern int cache_process(int size, const char *path, const char *key, int ttl, cache_fill_fn fn, void *cbdata); /* List info about all cache entries on stdout */ extern int cache_ls(const char *path); /* Print a message to stdout */ extern void cache_log(const char *format, ...); extern unsigned long hash_str(const char *str); #endif /* CGIT_CACHE_H */