Build a static library by default. Add Cmake option to build shared library.
This commit is contained in:
@@ -15,6 +15,8 @@ set(CMAKE_COLOR_MAKEFILE ON)
|
|||||||
|
|
||||||
option(DEBUG "Compile in debug mode" OFF)
|
option(DEBUG "Compile in debug mode" OFF)
|
||||||
option(EXAMPLES "Compile also some examples" ON)
|
option(EXAMPLES "Compile also some examples" ON)
|
||||||
|
option(BUILD_SHARED "Build shared libarary" OFF)
|
||||||
|
|
||||||
|
|
||||||
# cmake -DDEBUG=on -> debugging
|
# cmake -DDEBUG=on -> debugging
|
||||||
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
@@ -52,7 +54,13 @@ aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} SOURCES)
|
|||||||
#list(APPEND ${PROJ}_LIBRARIES "-lfftw3_threads")
|
#list(APPEND ${PROJ}_LIBRARIES "-lfftw3_threads")
|
||||||
|
|
||||||
# library
|
# library
|
||||||
|
|
||||||
|
if(BUILD_SHARED)
|
||||||
add_library(${PROJ} SHARED ${SOURCES})
|
add_library(${PROJ} SHARED ${SOURCES})
|
||||||
|
else()
|
||||||
|
add_library(${PROJ} STATIC ${SOURCES})
|
||||||
|
endif()
|
||||||
|
|
||||||
# library header files
|
# library header files
|
||||||
set(LIBHEADER "sidservo.h")
|
set(LIBHEADER "sidservo.h")
|
||||||
# -I
|
# -I
|
||||||
|
|||||||
Reference in New Issue
Block a user