Commit b12e9f33 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum
Browse files

[CHANGE] - now also external libs (nifti, biosig, eep) use a common prefix to...

[CHANGE] - now also external libs (nifti, biosig, eep) use a common prefix to avoid name clashes with system libs
parent 03ec2d4d
......@@ -16,7 +16,7 @@ FILE( GLOB DATAHANDLER_IO_SRC "io/*.cpp" "io/*.h" ) # former WLoader
# TARGET_LINK_LIBRARIES( dataHandler common ${Boost_LIBRARIES} niftiio libeep ${OPENSCENEGRAPH_LIBRARIES})
#ELSE()
ADD_LIBRARY( OWdataHandler ${DATAHANDLER_SRC} ${DATAHANDLER_EXCEPTIONS_SRC} ${DATAHANDLER_IO_SRC} ${DATAHANDLER_DATASTRUCTURES_SRC} )
TARGET_LINK_LIBRARIES( OWdataHandler OWcommon ${Boost_LIBRARIES} niftiio biosig libeep ${OPENSCENEGRAPH_LIBRARIES})
TARGET_LINK_LIBRARIES( OWdataHandler OWcommon ${Boost_LIBRARIES} OWext_niftiio OWext_biosig OWext_eep ${OPENSCENEGRAPH_LIBRARIES})
#ENDIF()
# Unit tests
IF( OW_COMPILE_TESTS )
......
......@@ -11,7 +11,7 @@ FILE( GLOB DATAHANDLER_IO_SRC "*.cpp" "*.h" )
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${DATAHANDLER_IO_SRC}"
"OWdataHandler;niftiio;biosig;libeep"
"OWdataHandler;OWext_niftiio;OWext_biosig;OWext_eep"
"WWriter.cpp" # too simple to test
"WReader.cpp" # too simple to test
"WWriterLookUpTableVTK.cpp" # there is only one member function which is not trivial, but its more an integration test
......
......@@ -3,17 +3,17 @@
# third party software!
IF( CMAKE_GENERATOR MATCHES "Visual Studio" )
SET( CMAKE_CXX_FLAGS "/EHsc /DWIN32")
SET( CMAKE_C_FLAGS "/TC /DWIN32")
SET( CMAKE_CXX_FLAGS "/EHsc /DWIN32")
SET( CMAKE_C_FLAGS "/TC /DWIN32")
ELSE()
SET( CMAKE_CXX_FLAGS "-pedantic -Wno-write-strings -Wno-deprecated -Wformat=0")
SET( CMAKE_C_FLAGS "-w")
SET( CMAKE_CXX_FLAGS "-pedantic -Wno-write-strings -Wno-deprecated -Wformat=0")
SET( CMAKE_C_FLAGS "-w")
ENDIF()
FILE( GLOB BIOSIG_SRC "*.c" "*.cpp" "*.h" "XMLParser/*.cpp" "XMLParser/*.h" )
ADD_LIBRARY( biosig ${BIOSIG_SRC} )
ADD_LIBRARY( OWext_biosig ${BIOSIG_SRC} )
IF( CMAKE_HOST_SYSTEM MATCHES Windows )
TARGET_LINK_LIBRARIES( biosig ws2_32 )
TARGET_LINK_LIBRARIES( OWext_biosig ws2_32 )
ENDIF()
......@@ -3,17 +3,17 @@
# third party software!
IF( CMAKE_GENERATOR MATCHES "Visual Studio" )
SET( CMAKE_CXX_FLAGS "/EHsc /DWIN32")
SET( CMAKE_C_FLAGS "/TC /DWIN32")
SET( CMAKE_CXX_FLAGS "/EHsc /DWIN32")
SET( CMAKE_C_FLAGS "/TC /DWIN32")
ELSE()
SET( CMAKE_CXX_FLAGS "-pedantic -Wno-write-strings -Wno-deprecated -Wformat=0")
SET( CMAKE_C_FLAGS "-w")
SET( CMAKE_CXX_FLAGS "-pedantic -Wno-write-strings -Wno-deprecated -Wformat=0")
SET( CMAKE_C_FLAGS "-w")
ENDIF()
FILE( GLOB BIOSIG_SRC "*.c" "*.cpp" "*.h" "XMLParser/*.cpp" "XMLParser/*.h" )
ADD_LIBRARY( biosig ${BIOSIG_SRC} )
ADD_LIBRARY( OWext_biosig ${BIOSIG_SRC} )
IF( CMAKE_HOST_SYSTEM MATCHES Windows )
TARGET_LINK_LIBRARIES( biosig ws2_32 )
TARGET_LINK_LIBRARIES( OWext_biosig ws2_32 )
ENDIF()
......@@ -10,9 +10,9 @@ ENDIF()
FILE( GLOB LIBEEP_SRC "libavr/*.c" "libcnt/*.c" "libeep/*.c" )
ADD_LIBRARY( libeep ${LIBEEP_SRC} )
ADD_LIBRARY( OWext_eep ${LIBEEP_SRC} )
IF( CMAKE_GENERATOR MATCHES "Visual Studio" )
TARGET_LINK_LIBRARIES( libeep )
TARGET_LINK_LIBRARIES( OWext_eep )
ELSE()
TARGET_LINK_LIBRARIES( libeep m )
TARGET_LINK_LIBRARIES( OWext_eep m )
ENDIF()
......@@ -13,6 +13,7 @@ IF( ZLIB_FOUND )
INCLUDE_DIRECTORIES( ${OPENSCENEGRAPH_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR} )
ENDIF( ZLIB_FOUND )
SET( PACKAGE_PREFIX "OWext_" )
SET(ZNZLIB_SRC znzlib.c znzlib.h)
SET(NIFTI_ZNZLIB_NAME ${PACKAGE_PREFIX}znz)
ADD_LIBRARY(${NIFTI_ZNZLIB_NAME} ${ZNZLIB_SRC} )
......
......@@ -5,10 +5,11 @@ FILE( GLOB_RECURSE MODULES_SRC "modules/*.cpp" "modules/*.h" )
FILE( GLOB KERNEL_EXCEPTIONS_SRC "exceptions/*.cpp" "exceptions/*.h" )
FILE( GLOB KERNEL_COMBINER_SRC "combiner/*.cpp" "combiner/*.h" )
add_definitions( '-DW_MODULE_PREFIX="OWmodule"' ) # this prefix is used to define the filename of module libs
ADD_LIBRARY( OWkernel ${KERNEL_SRC} ${MODULES_SRC} ${KERNEL_EXCEPTIONS_SRC} ${KERNEL_COMBINER_SRC} )
TARGET_LINK_LIBRARIES( OWkernel OWcommon OWdataHandler OWge ${OPENSCENEGRAPH_LIBRARIES} ${CMAKE_DL_LIBS} )
# Unit tests
IF( OW_COMPILE_TESTS )
# SET( testLibs guiqt4 )
......
......@@ -105,6 +105,6 @@ void WModuleLoader::load( WSharedAssociativeContainer< std::set< boost::shared_p
std::string WModuleLoader::getModulePrefix()
{
// all module file names need to have this prefix:
return WSharedLib::getSystemPrefix() + "module_";
return WSharedLib::getSystemPrefix() + W_MODULE_PREFIX;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment