Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 

22 rindas
737 B

  1. cmake_minimum_required(VERSION 3.0)
  2. # Have CMake find our pthreads library within our toolchain (required for this library)
  3. set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
  4. find_package(Threads REQUIRED)
  5. # add all the *.c files as sources
  6. FILE(GLOB SRC_FILES ${PROJECT_SOURCE_DIR}/wiringPiD/*.c
  7. ${PROJECT_SOURCE_DIR}/wiringPi/*.{c,h}
  8. )
  9. # make this output a shared library (with .so output)
  10. add_library (wiringPi SHARED ${SRC_FILES})
  11. # be sure to include the current source directory for header files
  12. target_include_directories (wiringPi PUBLIC ${PROJECT_SOURCE_DIR}/wiringPi
  13. )
  14. # add the following required libraries:
  15. # Threads, Math, Crypt, and RealTime
  16. target_link_libraries(wiringPi ${CMAKE_THREAD_LIBS_INIT} crypt m rt)