1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 08:09:32 +02:00

Don't declare snprintf macro for MSVC 2015 and 2017 in lv2/CMakeLists.txt

That declaring breaks build on MSVC 2015/17 (2013 is ok). There is a note about
changed behaviour of snprintf beginning from VS 2015 here:
https://docs.microsoft.com/ru-ru/cpp/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l?view=vs-2017#remarks
This commit is contained in:
Виталий Кирсанов 2019-01-13 19:08:43 +03:00
parent 5a7b6a7323
commit 1fc3acf595

View File

@ -3,7 +3,7 @@ set( TARGET lv2 )
set( TARGET_SOURCE ${LIB_SRC_DIRECTORY}${TARGET} )
project( ${TARGET} )
set( SOURCES
set( SOURCES
#${LIB_SRC_DIRECTORY}lv2/sord/src/sordmm_test.cpp
#${LIB_SRC_DIRECTORY}lv2/suil/src/gtk2_in_qt4.cpp
#${LIB_SRC_DIRECTORY}lv2/suil/src/qt4_in_gtk2.cpp
@ -67,17 +67,19 @@ ${LIB_SRC_DIRECTORY}lv2/suil/src/suil_instance.c
)
# This defines the #define on both Windows and Linux.
add_definitions(
add_definitions(
-D_LIB
-Dsnprintf=_snprintf
-Dinline=__inline # Not needed in non CMake version.
-DHAVE_FMAX
-DLILV_INTERNAL
-D_DEBUG
)
if( NOT MSVC OR MSVC_VERSION LESS 1900 )
add_definitions(-Dsnprintf=_snprintf)
endif()
add_library( ${TARGET} STATIC ${SOURCES})
add_compile_options(/TP)
target_include_directories( ${TARGET} PRIVATE
target_include_directories( ${TARGET} PRIVATE
${TARGET_SOURCE}/windows
${TARGET_SOURCE}/sord/src
${TARGET_SOURCE}/lilv
@ -88,4 +90,4 @@ ${TARGET_SOURCE}/sratom
${TARGET_SOURCE}/suil
)
target_link_libraries( ${TARGET} )
target_link_libraries( ${TARGET} )