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

FIX: lib4neuro library can be compiled statically from now

parent 98ffa371
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}) ...@@ -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'!") message(FATAL_ERROR "Please, set the variable DEPENDENCIES_LINK_TYPE to either 'static' or 'shared'!")
endif() endif()
if(ENV{DEPENDENCIES_LINK_TYPE})
set(DEPENDENCIES_LINK_TYPE ENV{DEPENDENCIES_LINK_TYPE})
endif()
#--------------------------------# #--------------------------------#
# Setting C++ compiler flags # # Setting C++ compiler flags #
#--------------------------------# #--------------------------------#
......
...@@ -7,10 +7,16 @@ if ("${BUILD_EXAMPLES}" STREQUAL "yes") ...@@ -7,10 +7,16 @@ if ("${BUILD_EXAMPLES}" STREQUAL "yes")
endif () endif ()
if ("${BUILD_LIB}" STREQUAL "yes") if ("${BUILD_LIB}" STREQUAL "yes")
set(LIB_TYPE "STATIC")
if(DEPENDENCIES_LINK_TYPE STREQUAL "shared")
set(LIB_TYPE "SHARED")
endif()
add_library( add_library(
exprtk_wrap exprtk_wrap
SHARED ${LIB_TYPE}
General/ExprtkWrapper.cpp General/ExprtkWrapper.cpp
Exception/Exceptions.cpp Exception/Exceptions.cpp
...@@ -31,7 +37,11 @@ if ("${BUILD_LIB}" STREQUAL "yes") ...@@ -31,7 +37,11 @@ if ("${BUILD_LIB}" STREQUAL "yes")
${Boost_LIBRARIES} ${Boost_LIBRARIES}
) )
add_library(lib4neuro SHARED add_library(
lib4neuro
${LIB_TYPE}
Neuron/Neuron.cpp Neuron/Neuron.cpp
Neuron/NeuronBinary.cpp Neuron/NeuronBinary.cpp
Neuron/NeuronConstant.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