Ver a proveniência

Merge pull request #1 from sndnvaps/dev

[build] add cmake support
pull/47/head^2
dnv_aps sn há 9 anos
ascendente
cometimento
ab64f90976
5 ficheiros alterados com 86 adições e 0 eliminações
  1. +7
    -0
      CMakeLists.txt
  2. +9
    -0
      devLib/CMakeLists.txt
  3. +11
    -0
      gpio/CMakeLists.txt
  4. +39
    -0
      wiringPi/CMakeLists.txt
  5. +20
    -0
      wiringPi/CMakeLists.txt~

+ 7
- 0
CMakeLists.txt Ver ficheiro

@@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 2.8)
project(WiringPi_lib)

add_subdirectory(devLib)
add_subdirectory(gpio)
#add_subdirectory(pins)
add_subdirectory(wiringPi)

+ 9
- 0
devLib/CMakeLists.txt Ver ficheiro

@@ -0,0 +1,9 @@
set(devLib_src ds1302.c maxdetect.c piNes.c gertboard.c piFace.c lcd128x64.c lcd.c piGlow.c)
set(LIB_INSTALL_PATH /usr/lib)
add_library(libwiringPiDev SHARED ${devLib_src})
set(LIBRARY_OUTPUT_PATH {LIB_INSTALL_PATH)
add_definitions("-lpthread")
set_target_properties(libwiringPiDev PROPERTIES OUTPUT_NAME "wiringPiDev")
install(TARGETS libwiringPiDev DESTINATION ${LIB_INSTALL_PATH})



+ 11
- 0
gpio/CMakeLists.txt Ver ficheiro

@@ -0,0 +1,11 @@
include_directories(${PROJECT_SOURCE_DIR}/devLib)
include_directories(${PROJECT_SOURCE_DIR}/wiringPi)
#project(gpio)
set(GPIO_SRC gpio.c readall.c pins.c)
set(GPIO_BINARY_PATH /usr/bin)
add_executable(gpio ${GPIO_SRC})
target_link_libraries(gpio libwiringPi libwiringPiDev -lpthread -lm)
set(EXECUTABLE_OUTPUT_PATH ${GPIO_BINARY_PATH})
install(TARGETS gpio
RUNTIME DESTINATION bin)


+ 39
- 0
wiringPi/CMakeLists.txt Ver ficheiro

@@ -0,0 +1,39 @@
set(wiringPi_src wiringPi.c
wiringSerial.c wiringShift.c
piHiPri.c piThread.c
wiringPiSPI.c wiringPiI2C.c
softPwm.c softTone.c
mcp23008.c mcp23016.c mcp23017.c
mcp23s08.c mcp23s17.c
sr595.c
pcf8574.c pcf8591.c
mcp3002.c mcp3004.c mcp4802.c mcp3422.c
max31855.c max5322.c
sn3218.c
drcSerial.c
wpiExtensions.c)
set(LIB_INSTALL_PATH /usr/lib)
set(LIB_INSTALL_HEADERS_PATH /usr/local)
add_library(libwiringPi SHARED ${wiringPi_src})
set(LIBRARY_OUTPUT_PATH {LIB_INSTALL_PATH)
add_definitions("-lpthread")
set_target_properties(libwiringPi PROPERTIES OUTPUT_NAME "wiringPi")

set(root_HEADERS
wiringPi.h
wiringSerial.h wiringShift.h
wiringPiSPI.h wiringPiI2C.h
softPwm.h softTone.h
mcp23008.h mcp23016.h mcp23017.h
mcp23s08.h mcp23s17.h
sr595.h
pcf8574.h pcf8591.h
mcp3002.h mcp3004.h mcp4802.h mcp3422.h
max31855.h max5322.h
sn3218.h
drcSerial.h
wpiExtensions.h
)

install(FILES ${root_HEADERS} DESTINATION ${LIB_INSTALL_HEADERS_PATH}/include)
install(TARGETS libwiringPi DESTINATION ${LIB_INSTALL_PATH})

+ 20
- 0
wiringPi/CMakeLists.txt~ Ver ficheiro

@@ -0,0 +1,20 @@
set(wiringPi_src wiringPi.c
wiringSerial.c wiringShift.c
piHiPri.c piThread.c
wiringPiSPI.c wiringPiI2C.c
softPwm.c softTone.c
mcp23008.c mcp23016.c mcp23017.c
mcp23s08.c mcp23s17.c
sr595.c
pcf8574.c pcf8591.c
mcp3002.c mcp3004.c mcp4802.c mcp3422.c
max31855.c max5322.c
sn3218.c
drcSerial.c
wpiExtensions.c)
set(LIB_INSTALL_PATH /usr/lib)
add_library(libwiringPi SHARED ${wiringPi_src})
set(LIBRARY_OUTPUT_PATH {LIB_INSTALL_PATH)
set_target_properties(libwiringPi PROPERTIES OUTPUT_NAME "wiringPi")



Carregando…
Cancelar
Guardar