Add cmake configuration
This commit is contained in:
parent
f9ea34994b
commit
f2d0f84fe1
27
CMakeLists.txt
Normal file
27
CMakeLists.txt
Normal file
@ -0,0 +1,27 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
project(logc)
|
||||
|
||||
enable_language(C)
|
||||
add_definitions(-std=c99)
|
||||
|
||||
set(LOGC_SOURCES
|
||||
src/log.c
|
||||
)
|
||||
|
||||
include_directories(src)
|
||||
|
||||
add_library(logc_shared SHARED ${LOGC_SOURCES})
|
||||
|
||||
set(PUBLIC_HEADERS
|
||||
src/log.h
|
||||
)
|
||||
|
||||
set_target_properties(logc_shared PROPERTIES
|
||||
PUBLIC_HEADER "${PUBLIC_HEADERS}"
|
||||
)
|
||||
|
||||
install(TARGETS logc_shared
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
Loading…
Reference in New Issue
Block a user