Skip to content
Snippets Groups Projects
Commit 3a90c96e authored by Martin Beseda's avatar Martin Beseda
Browse files

FIX: lib4neuro library can be compiled statically from now

parent 20cd0fcf
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,10 @@ if(NOT DEPENDENCIES_LINK_TYPE AND NOT ENV{DEPENDENCIES_LINK_TYPE})
message(FATAL_ERROR "Please, set the variable DEPENDENCIES_LINK_TYPE to either 'static' or 'shared'!")
endif()
if(ENV{DEPENDENCIES_LINK_TYPE})
set(DEPENDENCIES_LINK_TYPE ENV{DEPENDENCIES_LINK_TYPE})
endif()
#--------------------------------#
# Setting C++ compiler flags #
#--------------------------------#
......
......@@ -7,10 +7,16 @@ if ("${BUILD_EXAMPLES}" STREQUAL "yes")
endif ()
if ("${BUILD_LIB}" STREQUAL "yes")
set(LIB_TYPE "STATIC")
if(DEPENDENCIES_LINK_TYPE STREQUAL "shared")
set(LIB_TYPE "SHARED")
endif()
add_library(
exprtk_wrap
SHARED
${LIB_TYPE}
General/ExprtkWrapper.cpp
Exception/Exceptions.cpp
......@@ -31,7 +37,11 @@ if ("${BUILD_LIB}" STREQUAL "yes")
${Boost_LIBRARIES}
)
add_library(lib4neuro SHARED
add_library(
lib4neuro
${LIB_TYPE}
Neuron/Neuron.cpp
Neuron/NeuronBinary.cpp
Neuron/NeuronConstant.cpp
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment