CMakeLists.txt 913 B

12345678910111213141516171819202122232425
  1. cmake_minimum_required(VERSION 3.23)
  2. project(libmegapixels C)
  3. set(LIBRARY_VERSION_MAJOR 0)
  4. set(LIBRARY_VERSION_STRING 0.1)
  5. set(CMAKE_C_STANDARD 23)
  6. set(CMAKE_C_VISIBILITY_PRESET hidden)
  7. add_library(megapixels SHARED include/libmegapixels.h src/findconfig.c src/parse.c src/mode.c src/pipeline.c src/log.c src/util.c src/convert.c src/aaa.c)
  8. set_target_properties(megapixels PROPERTIES
  9. VERSION ${LIBRARY_VERSION_STRING}
  10. SOVERSION ${LIBRARY_VERSION_MAJOR}
  11. PUBLIC_HEADER include/libmegapixels.h)
  12. target_include_directories(megapixels PUBLIC include)
  13. target_link_libraries(megapixels "config")
  14. add_executable(findconfig util/findconfig.c)
  15. target_include_directories(findconfig PUBLIC include)
  16. target_link_libraries(findconfig PUBLIC megapixels)
  17. add_executable(getframe util/getframe.c)
  18. target_include_directories(getframe PUBLIC include)
  19. target_link_libraries(getframe PUBLIC megapixels)