Renewing cmake config

parent 7772ff74
...@@ -14,31 +14,31 @@ vista_use_package( SimpleIni QUIET ) ...@@ -14,31 +14,31 @@ vista_use_package( SimpleIni QUIET )
if( NOT DEFINED ITA_BASE_WITH_FASTMATH_IPP ) if( NOT DEFINED ITA_BASE_WITH_FASTMATH_IPP )
set( ITA_BASE_WITH_FASTMATH_IPP OFF CACHE BOOL "Build with IPP implementation of fast math ops" ) set( ITA_BASE_WITH_FASTMATH_IPP OFF CACHE BOOL "Build with IPP implementation of fast math ops" )
endif() endif( )
if( NOT DEFINED ITA_BASE_WITH_FASTMATH_ASSEMBLER ) if( NOT DEFINED ITA_BASE_WITH_FASTMATH_ASSEMBLER )
set( ITA_BASE_WITH_FASTMATH_ASSEMBLER OFF CACHE BOOL "Build with assembler implementation of fast math ops" ) set( ITA_BASE_WITH_FASTMATH_ASSEMBLER OFF CACHE BOOL "Build with assembler implementation of fast math ops" )
endif() endif( )
if( NOT DEFINED ITA_BASE_WITH_SNDFILE ) if( NOT DEFINED ITA_BASE_WITH_SNDFILE )
set( ITA_BASE_WITH_SNDFILE ON CACHE BOOL "Build with libsndfile to read/write audio samples for ITASampleFrame" ) set( ITA_BASE_WITH_SNDFILE ON CACHE BOOL "Build with libsndfile to read/write audio samples for ITASampleFrame" )
endif() endif( )
if( NOT DEFINED ITA_BASE_WITH_OLD_ATOMICS ) if( NOT DEFINED ITA_BASE_WITH_OLD_ATOMICS )
set( ITA_BASE_WITH_OLD_ATOMICS OFF CACHE BOOL "Build with old atomic code for non-C++11 compatible compilers" ) set( ITA_BASE_WITH_OLD_ATOMICS OFF CACHE BOOL "Build with old atomic code for non-C++11 compatible compilers" )
endif() endif( )
if( NOT DEFINED ITA_BASE_WITH_REGULAR_EXPRESSIONS ) if( NOT DEFINED ITA_BASE_WITH_REGULAR_EXPRESSIONS )
set( ITA_BASE_WITH_REGULAR_EXPRESSIONS OFF CACHE BOOL "Build with old regular expressions code for string manipulation" ) set( ITA_BASE_WITH_REGULAR_EXPRESSIONS OFF CACHE BOOL "Build with old regular expressions code for string manipulation" )
endif() endif( )
if( NOT DEFINED ITA_BASE_WITH_CONFIG_OLD_IMPL ) if( NOT DEFINED ITA_BASE_WITH_CONFIG_OLD_IMPL )
set( ITA_BASE_WITH_CONFIG_OLD_IMPL OFF CACHE BOOL "Build with old INI file configuration implementation (uses legacy regular expressions)" ) set( ITA_BASE_WITH_CONFIG_OLD_IMPL OFF CACHE BOOL "Build with old INI file configuration implementation (uses legacy regular expressions)" )
endif() endif( )
if( NOT DEFINED ITA_BASE_WITH_OLD_RAVEN_OPS ) if( NOT DEFINED ITA_BASE_WITH_OLD_RAVEN_OPS )
set( ITA_BASE_WITH_OLD_RAVEN_OPS OFF CACHE BOOL "Build with old ITAOps helper functions implementation (legacy code for RAVEN compatibility)" ) set( ITA_BASE_WITH_OLD_RAVEN_OPS OFF CACHE BOOL "Build with old ITAOps helper functions implementation (legacy code for RAVEN compatibility)" )
endif() endif( )
# includes # includes
...@@ -110,12 +110,11 @@ set( ITABaseSources ...@@ -110,12 +110,11 @@ set( ITABaseSources
if( WIN32 ) if( WIN32 )
list( APPEND ITABaseHeader "include/ITAHPT.h" "include/ITAMutex.h" "include/ITATimer.h" ) list( APPEND ITABaseHeader "include/ITAHPT.h" "include/ITAMutex.h" "include/ITATimer.h" )
list( APPEND ITABaseSources "src/ITAHPT.cpp" "src/ITAMutex.cpp" "src/ITATimer.cpp" ) list( APPEND ITABaseSources "src/ITAHPT.cpp" "src/ITAMutex.cpp" "src/ITATimer.cpp" )
else() else( )
add_definitions( -DUSE_SIMPLEINI ) add_definitions( -DUSE_SIMPLEINI )
list( APPEND ITABaseSources "src/ITAPosixRealtimeClock.cpp" "src/simpleini/SimpleIni.h" "src/simpleini/ConvertUTF.h" "src/simpleini/ConvertUTF.c" ) list( APPEND ITABaseSources "src/ITAPosixRealtimeClock.cpp" "src/simpleini/SimpleIni.h" "src/simpleini/ConvertUTF.h" "src/simpleini/ConvertUTF.c" )
list( APPEND ITABaseSources "src/ITAConfigUtilsSimpleIniImpl.cpp" ) list( APPEND ITABaseSources "src/ITAConfigUtilsSimpleIniImpl.cpp" )
endif() endif( )
if( VSNDFILE_FOUND AND ITA_BASE_WITH_SNDFILE ) if( VSNDFILE_FOUND AND ITA_BASE_WITH_SNDFILE )
set( ITABaseHeader "${ITABaseHeader}" set( ITABaseHeader "${ITABaseHeader}"
...@@ -131,68 +130,64 @@ if( VSNDFILE_FOUND AND ITA_BASE_WITH_SNDFILE ) ...@@ -131,68 +130,64 @@ if( VSNDFILE_FOUND AND ITA_BASE_WITH_SNDFILE )
"src/libsndfileAudiofileWriter.cpp" "src/libsndfileAudiofileWriter.cpp"
) )
add_definitions( -DITABASE_WITH_SNDFILE ) add_definitions( -DITABASE_WITH_SNDFILE )
endif() endif( )
if( VIPP_FOUND AND ITA_BASE_WITH_FASTMATH_IPP ) if( VIPP_FOUND AND ITA_BASE_WITH_FASTMATH_IPP )
set( ITABaseSources "${ITABaseSources}" "src/ITAFastMathImplIPP.cpp" ) set( ITABaseSources "${ITABaseSources}" "src/ITAFastMathImplIPP.cpp" )
elseif( ITA_BASE_WITH_FASTMATH_ASSEMBLER ) elseif( ITA_BASE_WITH_FASTMATH_ASSEMBLER )
set( ITABaseSources "${ITABaseSources}" "src/ITAFastMathImplAssembler.cpp" ) # not recommended set( ITABaseSources "${ITABaseSources}" "src/ITAFastMathImplAssembler.cpp" ) # not recommended
else() else( )
set( ITABaseSources "${ITABaseSources}" "src/ITAFastMathImpl.cpp" ) set( ITABaseSources "${ITABaseSources}" "src/ITAFastMathImpl.cpp" )
endif() endif( )
if( ITA_BASE_WITH_OLD_ATOMICS ) if( ITA_BASE_WITH_OLD_ATOMICS )
set( ITABaseHeader "${ITABaseHeader}" "include/ITAAtomicOps.h" "include/ITAAtomicPrimitives.h" ) set( ITABaseHeader "${ITABaseHeader}" "include/ITAAtomicOps.h" "include/ITAAtomicPrimitives.h" )
if( WIN32 ) if( WIN32 )
set( ITABaseSources "${ITABaseSources}" "src/ITAAtomicOpsWin32Impl.cpp" ) set( ITABaseSources "${ITABaseSources}" "src/ITAAtomicOpsWin32Impl.cpp" )
else( WIN32 ) else( )
set( ITABaseSources "${ITABaseSources}" "src/ITAAtomicOpsGCCBuiltinsImpl.cpp" ) set( ITABaseSources "${ITABaseSources}" "src/ITAAtomicOpsGCCBuiltinsImpl.cpp" )
endif( WIN32 ) endif( )
endif() endif( )
if( ITA_BASE_WITH_OLD_RAVEN_OPS ) if( ITA_BASE_WITH_OLD_RAVEN_OPS )
if( NOT ITA_BASE_WITH_CONFIG_OLD_IMPL ) if( NOT ITA_BASE_WITH_CONFIG_OLD_IMPL )
message( FATAL_ERROR "ITABase old RAVEN ops requires regular expressions and old config implementation. Please activate." ) message( FATAL_ERROR "ITABase old RAVEN ops requires regular expressions and old config implementation. Please activate." )
endif() endif( )
set( ITABaseHeader "${ITABaseHeader}" "include/ITAOps.h" ) set( ITABaseHeader "${ITABaseHeader}" "include/ITAOps.h" )
set( ITABaseSources "${ITABaseSources}" "src/ITAOps.cpp" ) set( ITABaseSources "${ITABaseSources}" "src/ITAOps.cpp" )
endif() endif( )
if( VPCRE_FOUND AND ITA_BASE_WITH_REGULAR_EXPRESSIONS ) if( VPCRE_FOUND AND ITA_BASE_WITH_REGULAR_EXPRESSIONS )
add_definitions( -DPCRE_STATIC ) add_definitions( -DPCRE_STATIC )
list( APPEND ITABaseSources "src/ITAStringUtilsPCRE.cpp" ) list( APPEND ITABaseSources "src/ITAStringUtilsPCRE.cpp" )
else() else( )
list( APPEND ITABaseSources "src/ITAStringUtils.cpp" ) list( APPEND ITABaseSources "src/ITAStringUtils.cpp" )
endif() endif( )
if( ITA_BASE_WITH_CONFIG_OLD_IMPL AND NOT ITA_BASE_WITH_CONFIG_SIMPLE_INI ) if( ITA_BASE_WITH_CONFIG_OLD_IMPL AND NOT ITA_BASE_WITH_CONFIG_SIMPLE_INI )
if( NOT ITA_BASE_WITH_REGULAR_EXPRESSIONS ) if( NOT ITA_BASE_WITH_REGULAR_EXPRESSIONS )
message( FATAL_ERROR "ITABase old config implementation requires regular expressions. Please activate." ) message( FATAL_ERROR "ITABase old config implementation requires regular expressions. Please activate." )
endif() endif( )
list( APPEND ITABaseHeader "include/ITAConfigUtils.h" ) list( APPEND ITABaseHeader "include/ITAConfigUtils.h" )
list( APPEND ITABaseSources "src/ITAConfigUtils.cpp" "src/ITAConfigUtilsWin32Impl.cpp" ) list( APPEND ITABaseSources "src/ITAConfigUtils.cpp" "src/ITAConfigUtilsWin32Impl.cpp" )
endif() endif( )
# jst: necessary?
#if( ITA_VISTA_BUILD_STATIC )
# add_definitions( -DVISTABASE_STATIC -DVISTAMATH_STATIC -DVISTAASPECTS_STATIC -DVISTATOOLS_STATIC -DVISTAINTERPROCCOMM_STATIC )
#endif()
# ITA defaults to shared library build mode, so extra definition is required if you want to build against a static library # preprocessor
if( NOT ITA_CORE_LIBS_BUILD_STATIC ) if( BUILD_SHARED_LIBS )
add_definitions( -DITA_BASE_EXPORT ) add_definitions( -DITA_BASE_EXPORT )
else() else( )
add_definitions( -DITA_BASE_STATIC ) add_definitions( -DITA_BASE_STATIC )
endif() endif( )
if( ITA_VISTA_BUILD_STATIC )
add_definitions( -DVISTABASE_STATIC -DVISTAMATH_STATIC -DVISTAASPECTS_STATIC -DVISTATOOLS_STATIC -DVISTAINTERPROCCOMM_STATIC )
endif( )
if( NOT WIN32 ) if( NOT WIN32 )
add_definitions( -std=gnu++11 ) add_definitions( -std=gnu++11 )
endif() endif( )
# linker # linker
add_library( ITABase ${ITABaseHeader} ${ITABaseSources} ) add_library( ITABase ${ITABaseHeader} ${ITABaseSources} )
...@@ -213,4 +208,4 @@ set_property( TARGET ITABase PROPERTY FOLDER "ITACoreLibs" ) ...@@ -213,4 +208,4 @@ set_property( TARGET ITABase PROPERTY FOLDER "ITACoreLibs" )
if( ITA_CORE_LIBS_WITH_TESTS ) if( ITA_CORE_LIBS_WITH_TESTS )
set( ITABASE_COMMON_BUILD TRUE ) set( ITABASE_COMMON_BUILD TRUE )
add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" ) add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" )
endif() endif( )
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