You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

40 regels
924 B

  1. # CMakeLists.txt for devLib
  2. cmake_minimum_required(VERSION 3.10)
  3. project(devLib)
  4. # Source files
  5. set(SRC
  6. ds1302.c maxdetect.c piNes.c
  7. gertboard.c piFace.c
  8. lcd128x64.c lcd.c
  9. scrollPhat.c
  10. piGlow.c
  11. )
  12. # Headers
  13. set(HEADERS
  14. ds1302.h maxdetect.h piNes.h
  15. gertboard.h piFace.h
  16. lcd128x64.h lcd.h
  17. scrollPhatFont.h scrollPhat.h
  18. piGlow.h
  19. )
  20. # Compiler flags
  21. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat=2 -Winline -pipe")
  22. # Add the library target
  23. add_library(wiringPiDev SHARED ${SRC})
  24. target_include_directories(wiringPiDev PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
  25. target_link_libraries(wiringPiDev PRIVATE wiringPi)
  26. # Set the library version
  27. set_target_properties(wiringPiDev PROPERTIES VERSION ${WIRINGPI_VERSION} SOVERSION ${WIRINGPI_SOVERSION})
  28. # Install headers
  29. install(FILES ${HEADERS} DESTINATION include)
  30. # Install the library
  31. install(TARGETS wiringPiDev LIBRARY DESTINATION lib)