identiconpp is a library to generate identicons for C++ and C.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. cmake_minimum_required (VERSION 3.2)
  2. project(identiconpp
  3. VERSION 0.6.1
  4. LANGUAGES CXX)
  5. option(WITH_TESTS "Enable Tests" NO)
  6. set(CMAKE_CXX_STANDARD 14)
  7. set(CMAKE_CXX_STANDARD_REQUIRED ON)
  8. set(CMAKE_CXX_EXTENSIONS OFF)
  9. set(CMAKE_CXX_FLAGS_DEBUG
  10. "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -Wpedantic -ftrapv \
  11. -fsanitize=undefined -g -Og -fno-omit-frame-pointer")
  12. if(CMAKE_BUILD_TYPE STREQUAL "Debug")
  13. add_definitions(-DDEBUG=1)
  14. endif()
  15. include(GNUInstallDirs)
  16. include_directories(${PROJECT_SOURCE_DIR}/src)
  17. include_directories(${PROJECT_BINARY_DIR})
  18. install(FILES README.md DESTINATION ${CMAKE_INSTALL_DOCDIR})
  19. add_subdirectory(src)
  20. configure_file("${PROJECT_SOURCE_DIR}/${PROJECT_NAME}.pc.in"
  21. "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc" @ONLY)
  22. configure_file("${PROJECT_SOURCE_DIR}/${PROJECT_NAME}_c.pc.in"
  23. "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_c.pc" @ONLY)
  24. install(FILES
  25. "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc"
  26. "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_c.pc"
  27. DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
  28. if(WITH_TESTS)
  29. add_subdirectory(tests)
  30. endif()
  31. include(packages.CMakeLists.txt)