Commit 7ae794dd authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Do not pass CMake flags to autotools project on Windows platform for autotools...

Do not pass CMake flags to autotools project on Windows platform for autotools projects (MSVC flags are not compatible with MinGW flags).
parent 8205ba3d
......@@ -171,18 +171,20 @@ endmacro(linphone_builder_apply_toolchain_flags)
macro(linphone_builder_apply_cmake_flags_to_autotools_project PROJNAME)
if("${EP_${PROJNAME}_USE_AUTOTOOLS}" STREQUAL "yes")
set(BUILD_TYPES "Debug" "Release" "RelWithDebInfo" "MinSizeRel")
list(FIND BUILD_TYPES "${CMAKE_BUILD_TYPE}" BUILD_TYPE_FOUND)
set(BUILD_TYPE_SUFFIX "")
if(NOT ${BUILD_TYPE_FOUND} EQUAL -1)
string(TOUPPER "${CMAKE_BUILD_TYPE}" UPPER_BUILD_TYPE)
set(BUILD_TYPE_SUFFIX "_${UPPER_BUILD_TYPE}")
endif(NOT ${BUILD_TYPE_FOUND} EQUAL -1)
set(ep_asflags "${CMAKE_AS_FLAGS${BUILD_TYPE_SUFFIX}}")
set(ep_cppflags "${CMAKE_CPP_FLAGS${BUILD_TYPE_SUFFIX}}")
set(ep_cflags "${CMAKE_C_FLAGS${BUILD_TYPE_SUFFIX}}")
set(ep_cxxflags "${CMAKE_CXX_FLAGS${BUILD_TYPE_SUFFIX}}")
set(ep_ldflags "${CMAKE_LD_FLAGS${BUILD_TYPE_SUFFIX}}")
if(NOT MSVC)
set(BUILD_TYPES "Debug" "Release" "RelWithDebInfo" "MinSizeRel")
list(FIND BUILD_TYPES "${CMAKE_BUILD_TYPE}" BUILD_TYPE_FOUND)
set(BUILD_TYPE_SUFFIX "")
if(NOT ${BUILD_TYPE_FOUND} EQUAL -1)
string(TOUPPER "${CMAKE_BUILD_TYPE}" UPPER_BUILD_TYPE)
set(BUILD_TYPE_SUFFIX "_${UPPER_BUILD_TYPE}")
endif(NOT ${BUILD_TYPE_FOUND} EQUAL -1)
set(ep_asflags "${CMAKE_AS_FLAGS${BUILD_TYPE_SUFFIX}}")
set(ep_cppflags "${CMAKE_CPP_FLAGS${BUILD_TYPE_SUFFIX}}")
set(ep_cflags "${CMAKE_C_FLAGS${BUILD_TYPE_SUFFIX}}")
set(ep_cxxflags "${CMAKE_CXX_FLAGS${BUILD_TYPE_SUFFIX}}")
set(ep_ldflags "${CMAKE_LD_FLAGS${BUILD_TYPE_SUFFIX}}")
endif(NOT MSVC)
endif("${EP_${PROJNAME}_USE_AUTOTOOLS}" STREQUAL "yes")
endmacro(linphone_builder_apply_cmake_flags_to_autotools_project)
......
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