Commit dce9bd6b authored by Ghislain MARY's avatar Ghislain MARY

Fix CMake warnings.

parent 3a27c46c
......@@ -57,7 +57,7 @@ else()
# Get build tools and flags for autotools projects (except for Windows Phone where we cannot build with MinGW)
if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsPhone")
if(NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone")
linphone_builder_get_autotools_configuration()
endif()
......
......@@ -36,7 +36,7 @@ if(LINPHONE_BUILDER_CHECK_LATEST)
OUTPUT_VARIABLE _builder_latest)
string(REPLACE "\t" ";" _builder_latest ${_builder_latest})
list(GET _builder_latest 0 _builder_latest_git_tag)
if("${EP_${_builder_name}_GIT_TAG}" STREQUAL "${_builder_latest_git_tag}")
if(EP_${_builder_name}_GIT_TAG STREQUAL "${_builder_latest_git_tag}")
message(STATUS "${_builder_name} is up-to-date")
else()
message(STATUS "${_builder_name} is outdated: ${EP_${_builder_name}_GIT_TAG} instead of ${_builder_latest_git_tag} [${EP_${_builder_name}_GIT_TAG_LATEST}]")
......@@ -176,7 +176,7 @@ else()
linphone_builder_add_builder_to_target(TARGET_ms2plugins x264)
linphone_builder_add_builder_to_target(TARGET_ms2plugins msx264)
endif()
if(ENABLE_VIDEO AND "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsPhone")
if(ENABLE_VIDEO AND (CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone"))
linphone_builder_add_builder_to_target(TARGET_ms2plugins mswp8vid)
endif()
endif()
......@@ -193,7 +193,7 @@ else()
# Do not build sqlite3, xml2 and zlib on IOS, they are provided by the system
linphone_builder_add_builder_to_target(TARGET_linphone sqlite3)
linphone_builder_add_builder_to_target(TARGET_linphone xml2)
if (NOT QNX)
if(NOT QNX)
linphone_builder_add_builder_to_target(TARGET_linphone zlib)
endif()
endif()
......
......@@ -58,7 +58,7 @@ if (APPLE)
set(EP_openh264_ADDITIONAL_OPTIONS "OS=\"ios\" ARCH=\"i386\"")
endif()
else()
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
if(CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
set(EP_openh264_ADDITIONAL_OPTIONS "ARCH=\"x86_64\"")
else()
set(EP_openh264_ADDITIONAL_OPTIONS "ARCH=\"x86\"")
......
......@@ -32,7 +32,7 @@ if(WIN32)
list(APPEND SOURCE_FILES sqlite3.def)
endif()
if("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsPhone")
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone")
add_definitions(
-DSQLITE_OS_WINRT=1
-DSQLITE_WIN32_FILEMAPPING_API=1
......
......@@ -40,7 +40,7 @@ else()
set(EP_xml2_LINKING_TYPE "${DEFAULT_VALUE_CMAKE_LINKING_TYPE}")
set(EP_xml2_PATCH_COMMAND "${CMAKE_COMMAND}" "-E" "copy" "${CMAKE_CURRENT_SOURCE_DIR}/builders/xml2/CMakeLists.txt" "<SOURCE_DIR>")
list(APPEND EP_xml2_PATCH_COMMAND "COMMAND" "${CMAKE_COMMAND}" "-E" "copy" "${CMAKE_CURRENT_SOURCE_DIR}/builders/xml2/config.h.cmake" "<SOURCE_DIR>")
if("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsPhone")
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone")
list(APPEND EP_xml2_PATCH_COMMAND "COMMAND" "${CMAKE_COMMAND}" "-E" "copy" "${CMAKE_CURRENT_SOURCE_DIR}/builders/xml2/windowsphone_port.h" "<SOURCE_DIR>")
endif()
endif()
......@@ -358,7 +358,7 @@ if(MSVC)
elseif(NOT APPLE)
set_target_properties(xml2 PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libxml2.syms")
endif()
if("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsPhone")
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone")
target_compile_options(xml2 PRIVATE "/FIwindowsphone_port.h")
endif()
......
This diff is collapsed.
......@@ -34,7 +34,7 @@ if(MSVC)
message(FATAL_ERROR "Could not find MinGW!")
endif()
if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsPhone")
if(NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone")
find_file(GCC_LIBRARY
NAMES libgcc.a
HINTS "C:/MinGW/lib/gcc/mingw32/*"
......
......@@ -81,7 +81,7 @@ endif()
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" _IS_SYSTEM_DIR)
if("${_IS_SYSTEM_DIR}" STREQUAL "-1")
if(_IS_SYSTEM_DIR STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif()
......
......@@ -73,7 +73,7 @@ if(APPLE)
endif()
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" _IS_SYSTEM_DIR)
if("${_IS_SYSTEM_DIR}" STREQUAL "-1")
if(_IS_SYSTEM_DIR STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif()
message("cmake install rpath: ${CMAKE_INSTALL_RPATH}")
......
......@@ -176,7 +176,7 @@ if(MSVC)
FILES_MATCHING PATTERN "libmswasapi.dll"
)
string(REGEX REPLACE "Visual Studio ([0-9]+).*" "\\1" MSVC_VERSION "${CMAKE_GENERATOR}")
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(MSVC_DEBUG_SYSTEM_LIBRARIES "d")
endif()
find_file(MSVCP_LIB "msvcp${MSVC_VERSION}0${MSVC_DEBUG_SYSTEM_LIBRARIES}.dll" PATHS "C:/Windows/System32")
......
......@@ -74,7 +74,7 @@ if(WIN32)
set(PACKAGES_TO_BUILD "exe" "msi" "zip" "wheel")
set(PY_MODULE_EXT ".pyd")
string(REGEX REPLACE "Visual Studio ([0-9]+).*" "\\1" MSVC_VERSION "${CMAKE_GENERATOR}")
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(MSVC_DEBUG_SYSTEM_LIBRARIES "d")
endif()
find_file(MSVCP_LIB msvcp${MSVC_VERSION}0${MSVC_DEBUG_SYSTEM_LIBRARIES}.dll PATHS "C:/Windows/System32")
......@@ -148,7 +148,7 @@ set(PYLINPHONE_LDFLAGS "")
if(APPLE)
set(PYLINPHONE_LDFLAGS "${LINPHONE_LDFLAGS_STR} -undefined dynamic_lookup")
endif()
if(NOT "${PYLINPHONE_LDFLAGS}" STREQUAL "")
if(PYLINPHONE_LDFLAGS)
set_target_properties(pylinphone PROPERTIES LINK_FLAGS "${PYLINPHONE_LDFLAGS}")
endif()
set_target_properties(pylinphone PROPERTIES OUTPUT_NAME linphone PREFIX "" SUFFIX "${PY_MODULE_EXT}")
......
......@@ -23,7 +23,7 @@
if(MSVC)
string(REGEX REPLACE "Visual Studio ([0-9]+).*" "\\1" MSVC_VERSION "${CMAKE_GENERATOR}")
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
find_file(MSVCR_LIB msvcr${MSVC_VERSION}0d.dll PATHS "C:/Windows/System32")
else()
find_file(MSVCR_LIB msvcr${MSVC_VERSION}0.dll PATHS "C:/Windows/System32")
......@@ -45,7 +45,7 @@ if(UNIX AND NOT APPLE)
else()
file(COPY ${LINPHONE_DYNAMIC_LIBRARIES_TO_INSTALL} DESTINATION "${OUTPUT_DIR}/linphone")
endif()
if(MSVC AND NOT "${MSVC_VERSION}" STREQUAL "9")
if(MSVC AND NOT MSVC_VERSION STREQUAL "9")
file(COPY ${MSVCR_LIB} DESTINATION "${OUTPUT_DIR}/linphone")
endif()
get_filename_component(LINPHONE_PYTHON_MODULE_PATH "${LINPHONE_PYTHON_MODULE}" DIRECTORY)
......@@ -63,7 +63,7 @@ file(COPY "${LINPHONE_SOURCE_DIR}/tester/rcfiles" DESTINATION "${OUTPUT_DIR}/lin
file(COPY "${LINPHONE_SOURCE_DIR}/tester/sounds" DESTINATION "${OUTPUT_DIR}/linphone/unittests/")
file(COPY "${LINPHONE_SOURCE_DIR}/tester/tester_hosts" DESTINATION "${OUTPUT_DIR}/linphone/unittests/")
file(GLOB_RECURSE LINPHONE_DATA_FILES RELATIVE "${OUTPUT_DIR}/linphone" "${OUTPUT_DIR}/linphone/*")
if("${PACKAGE_TYPE}" STREQUAL "msi")
if(PACKAGE_TYPE STREQUAL "msi")
set(BUILD_VERSION ${LINPHONE_VERSION})
else()
set(BUILD_VERSION ${LINPHONE_GIT_REVISION})
......
......@@ -31,7 +31,7 @@ else(APPLE)
set(BBNDK_SEARCH_PATH $ENV{HOME}/bbndk)
endif(APPLE)
file(GLOB BBNDK_ENV_SCRIPT ${BBNDK_SEARCH_PATH}/bbndk-env*.sh)
if("${BBNDK_ENV_SCRIPT}" STREQUAL "")
if(BBNDK_ENV_SCRIPT STREQUAL "")
message(FATAL_ERROR "Could not find the bbndk environment setup script. Please make sure you installed the BlackBerry 10 native SDK.")
endif()
......@@ -47,7 +47,7 @@ execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/get_qnx_target.sh
)
file(GLOB COMPILER_PATH "${QNX_HOST}/usr/bin/${COMPILER_PREFIX}*-gcc")
if("${COMPILER_PATH}" STREQUAL "")
if(COMPILER_PATH STREQUAL "")
message(FATAL_ERROR "Could not find compiler")
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