Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
marckleinebudde committed Oct 4, 2018
2 parents 12664ef + b217774 commit fba9ec8
Show file tree
Hide file tree
Showing 10 changed files with 2,691 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ GNUmakefile.in
/config.log
/config.status
/config/autoconf/
/config/libsocketcan.pc
/config/m4/libtool.m4
/config/m4/ltoptions.m4
/config/m4/ltsugar.m4
Expand Down
34 changes: 34 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
cmake_minimum_required(VERSION 3.3)

project(can-utils LANGUAGES C)
set(LIB_VERSION_MAJOR 2)
set(LIB_VERSION_MINOR 2)
set(LIB_VERSION_MICRO 1)
set(LIB_VERSION ${LIB_VERSION_MAJOR}.${LIB_VERSION_MINOR}.${LIB_VERSION_MICRO})
set(VERSION 2018.10.0)

include (GNUInstallDirs)

Expand Down Expand Up @@ -73,6 +78,35 @@ add_library(j1939 STATIC
libj1939.c
)

add_library(socketcan SHARED
libsocketcan.c
)

set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix \${prefix})
set(libdir \${exec_prefix}/${CMAKE_INSTALL_LIBDIR})
set(includedir \${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
configure_file(config/libsocketcan.pc.in config/libsocketcan.pc @ONLY)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/config/libsocketcan.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)

set_target_properties(socketcan
PROPERTIES PUBLIC_HEADER include/libsocketcan.h
SOVERSION ${LIB_VERSION_MAJOR}
VERSION ${LIB_VERSION}
)

install(TARGETS socketcan
LIBRARY
DESTINATION lib
COMPONENT Development
PUBLIC_HEADER
DESTINATION include
COMPONENT Development
)

foreach(name ${PROGRAMS})
add_executable(${name} ${name}.c)

Expand Down
9 changes: 9 additions & 0 deletions Documentation/main.dox
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @mainpage libsocketcan

This is libsocketcan, a userspace library to do some common tasks while dealing
with the socketcan Framework.

@defgroup extern External API
@defgroup intern Interally used callbacks and structures

*/
Loading

0 comments on commit fba9ec8

Please sign in to comment.