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()
......
......@@ -155,19 +155,19 @@ endfunction()
macro(linphone_builder_create_targets_list)
set(LINPHONE_BUILDER_TARGETS )
if("${LINPHONE_BUILDER_TARGET}" STREQUAL "belle-sip")
if(LINPHONE_BUILDER_TARGET STREQUAL "belle-sip")
list(APPEND LINPHONE_BUILDER_TARGETS "belle-sip")
elseif("${LINPHONE_BUILDER_TARGET}" STREQUAL "ortp")
elseif(LINPHONE_BUILDER_TARGET STREQUAL "ortp")
list(APPEND LINPHONE_BUILDER_TARGETS "ortp")
elseif("${LINPHONE_BUILDER_TARGET}" STREQUAL "ms2")
elseif(LINPHONE_BUILDER_TARGET STREQUAL "ms2")
list(APPEND LINPHONE_BUILDER_TARGETS "ortp" "ms2")
elseif("${LINPHONE_BUILDER_TARGET}" STREQUAL "ms2-plugins")
elseif(LINPHONE_BUILDER_TARGET STREQUAL "ms2-plugins")
list(APPEND LINPHONE_BUILDER_TARGETS "ortp" "ms2" "ms2-plugins")
elseif("${LINPHONE_BUILDER_TARGET}" STREQUAL "linphone")
elseif(LINPHONE_BUILDER_TARGET STREQUAL "linphone")
list(APPEND LINPHONE_BUILDER_TARGETS "belle-sip" "ortp" "ms2" "ms2-plugins" "linphone")
elseif("${LINPHONE_BUILDER_TARGET}" STREQUAL "flexisip")
elseif(LINPHONE_BUILDER_TARGET STREQUAL "flexisip")
list(APPEND LINPHONE_BUILDER_TARGETS "ortp" "flexisip")
elseif("${LINPHONE_BUILDER_TARGET}" STREQUAL "odb")
elseif(LINPHONE_BUILDER_TARGET STREQUAL "odb")
list(APPEND LINPHONE_BUILDER_TARGETS "odb" )
else()
message(FATAL_ERROR "Invalid LINPHONE_BUILDER_TARGET '${LINPHONE_BUILDER_TARGET}'")
......@@ -221,25 +221,25 @@ endmacro()
macro(linphone_builder_apply_flags)
foreach(BUILD_CONFIG "" "_DEBUG" "_MINSIZEREL" "_RELEASE" "_RELWITHDEBINFO")
if(NOT "${LINPHONE_BUILDER_CPPFLAGS}" STREQUAL "")
if(LINPHONE_BUILDER_CPPFLAGS)
set(CMAKE_C_FLAGS${BUILD_CONFIG} "${CMAKE_C_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CPPFLAGS}")
set(CMAKE_CXX_FLAGS${BUILD_CONFIG} "${CMAKE_CXX_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CPPFLAGS}")
set(AUTOTOOLS_C_FLAGS${BUILD_CONFIG} "${AUTOTOOLS_C_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CPPFLAGS}")
set(AUTOTOOLS_CXX_FLAGS${BUILD_CONFIG} "${AUTOTOOLS_CXX_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CPPFLAGS}")
endif()
if(NOT "${LINPHONE_BUILDER_CFLAGS}" STREQUAL "")
if(LINPHONE_BUILDER_CFLAGS)
set(CMAKE_C_FLAGS${BUILD_CONFIG} "${CMAKE_C_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CFLAGS}")
set(AUTOTOOLS_C_FLAGS${BUILD_CONFIG} "${AUTOTOOLS_C_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CFLAGS}")
endif()
if(NOT "${LINPHONE_BUILDER_CXXFLAGS}" STREQUAL "")
if(LINPHONE_BUILDER_CXXFLAGS)
set(CMAKE_CXX_FLAGS${BUILD_CONFIG} "${CMAKE_CXX_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CXXFLAGS}")
set(AUTOTOOLS_CXX_FLAGS${BUILD_CONFIG} "{AUTOTOOLS_CXX_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_CXX_FLAGS}")
endif()
if(NOT "${LINPHONE_BUILDER_OBJCFLAGS}" STREQUAL "")
if(LINPHONE_BUILDER_OBJCFLAGS)
set(CMAKE_C_FLAGS${BUILD_CONFIG} "${CMAKE_C_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_OBJCFLAGS}")
set(AUTOTOOLS_OBJC_FLAGS${BUILD_CONFIG} "${AUTOTOOLS_OBJC_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_OBJCFLAGS}")
endif()
if(NOT "${LINPHONE_BUILDER_LDFLAGS}" STREQUAL "")
if(LINPHONE_BUILDER_LDFLAGS)
# TODO: The two following lines should not be here
set(CMAKE_C_FLAGS${BUILD_CONFIG} "${CMAKE_C_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_LDFLAGS}")
set(CMAKE_CXX_FLAGS${BUILD_CONFIG} "${CMAKE_CXX_FLAGS${BUILD_CONFIG}} ${LINPHONE_BUILDER_LDFLAGS}")
......@@ -254,7 +254,7 @@ endmacro()
macro(linphone_builder_apply_cmake_flags_to_autotools_project PROJNAME)
if("${EP_${PROJNAME}_BUILD_METHOD}" STREQUAL "autotools")
if(EP_${PROJNAME}_BUILD_METHOD STREQUAL "autotools")
set(BUILD_TYPES "Debug" "Release" "RelWithDebInfo" "MinSizeRel")
list(FIND BUILD_TYPES "${CMAKE_BUILD_TYPE}" BUILD_TYPE_FOUND)
set(BUILD_TYPE_SUFFIX "")
......@@ -273,7 +273,7 @@ endmacro()
macro(linphone_builder_apply_extra_flags PROJNAME)
if("${EP_${PROJNAME}_BUILD_METHOD}" STREQUAL "autotools")
if(EP_${PROJNAME}_BUILD_METHOD STREQUAL "autotools")
set(ep_asflags "${ep_asflags} ${EP_${PROJNAME}_EXTRA_ASFLAGS}")
set(ep_cppflags "${ep_cppflags} ${EP_${PROJNAME}_EXTRA_CPPFLAGS}")
set(ep_cflags "${ep_cflags} ${EP_${PROJNAME}_EXTRA_CFLAGS}")
......@@ -282,13 +282,13 @@ macro(linphone_builder_apply_extra_flags PROJNAME)
set(ep_ldflags "${ep_ldflags} ${EP_${PROJNAME}_EXTRA_LDFLAGS}")
else()
foreach(BUILD_CONFIG "" "_DEBUG" "_MINSIZEREL" "_RELEASE" "_RELWITHDEBINFO")
if(NOT "${EP_${PROJNAME}_EXTRA_CFLAGS}" STREQUAL "")
if(EP_${PROJNAME}_EXTRA_CFLAGS)
set(CMAKE_C_FLAGS${BUILD_CONFIG} "${CMAKE_C_FLAGS${BUILD_CONFIG}} ${EP_${PROJNAME}_EXTRA_CFLAGS}")
endif()
if(NOT "${EP_${PROJNAME}_EXTRA_CXXFLAGS}" STREQUAL "")
if(EP_${PROJNAME}_EXTRA_CXXFLAGS)
set(CMAKE_CXX_FLAGS${BUILD_CONFIG} "${CMAKE_CXX_FLAGS${BUILD_CONFIG}} ${EP_${PROJNAME}_EXTRA_CXXFLAGS}")
endif()
if(NOT "${EP_${PROJNAME}_EXTRA_LDFLAGS}" STREQUAL "")
if(EP_${PROJNAME}_EXTRA_LDFLAGS)
set(CMAKE_EXE_LINKER_FLAGS${BUILD_CONFIG} "${CMAKE_EXE_LINKER_FLAGS${BUILD_CONFIG}} ${EP_${PROJNAME}_EXTRA_LDFLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS${BUILD_CONFIG} "${CMAKE_MODULE_LINKER_FLAGS${BUILD_CONFIG}} ${EP_${PROJNAME}_EXTRA_LDFLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS${BUILD_CONFIG} "${CMAKE_SHARED_LINKER_FLAGS${BUILD_CONFIG}} ${EP_${PROJNAME}_EXTRA_LDFLAGS}")
......@@ -349,7 +349,7 @@ endmacro()
# this function invokes configure_file() for the project, using the default file if
# the specific file is not defined
function(linphone_builder_configure_file_for_project PROJNAME CMD DEFAULT_CONF_FILE OUTPUT)
if("${EP_${PROJNAME}_${CMD}_COMMAND_SOURCE}" STREQUAL "")
if(NOT EP_${PROJNAME}_${CMD}_COMMAND_SOURCE)
message(STATUS "Using default file ${DEFAULT_CONF_FILE} for ${CMD} step of ${PROJNAME}")
configure_file(${DEFAULT_CONF_FILE} ${OUTPUT})
else()
......@@ -396,14 +396,14 @@ function(linphone_builder_add_external_project PROJNAME)
linphone_builder_apply_extra_flags(${PROJNAME})
linphone_builder_expand_external_project_vars()
if("${EP_${PROJNAME}_BUILD_METHOD}" STREQUAL "prebuilt")
if(EP_${PROJNAME}_BUILD_METHOD STREQUAL "prebuilt")
message("Using prebuilt ${PROJNAME}")
set(BUILD_COMMANDS
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E echo ""
BUILD_COMMAND ${CMAKE_COMMAND} -E echo ""
INSTALL_COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=<SOURCE_DIR> -DINSTALL_DIR=${CMAKE_INSTALL_PREFIX} -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/install_prebuilt.cmake
)
elseif("${EP_${PROJNAME}_BUILD_METHOD}" STREQUAL "custom")
elseif(EP_${PROJNAME}_BUILD_METHOD STREQUAL "custom")
set(ep_redirect_to_file "2>&1 >> ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}.log")
configure_file(${EP_${PROJNAME}_CONFIGURE_COMMAND_SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_configure.sh)
configure_file(${EP_${PROJNAME}_BUILD_COMMAND_SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_build.sh)
......@@ -422,19 +422,19 @@ function(linphone_builder_add_external_project PROJNAME)
BUILD_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_build.${SCRIPT_EXTENSION}
INSTALL_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_install.${SCRIPT_EXTENSION}
)
elseif("${EP_${PROJNAME}_BUILD_METHOD}" STREQUAL "autotools")
elseif(EP_${PROJNAME}_BUILD_METHOD STREQUAL "autotools")
linphone_builder_create_autogen_command(${PROJNAME})
linphone_builder_create_configure_command(${PROJNAME})
linphone_builder_create_build_command(${PROJNAME})
if("${EP_${PROJNAME}_CONFIG_H_FILE}" STREQUAL "")
set(ep_config_h_file config.h)
else()
if(EP_${PROJNAME}_CONFIG_H_FILE)
set(ep_config_h_file ${EP_${PROJNAME}_CONFIG_H_FILE})
endif()
if("${EP_${PROJNAME}_INSTALL_TARGET}" STREQUAL "")
set(ep_install_target "install")
else()
set(ep_config_h_file config.h)
endif()
if(EP_${PROJNAME}_INSTALL_TARGET)
set(ep_install_target "${EP_${PROJNAME}_INSTALL_TARGET}")
else()
set(ep_install_target "install")
endif()
set(ep_redirect_to_file "2>&1 >> ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}.log")
......@@ -446,20 +446,20 @@ function(linphone_builder_add_external_project PROJNAME)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/mingw_install.bat.cmake ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_install.bat)
# Build in source with MinGW as build out-of-source does not work
set(ep_build ${ep_source})
if(NOT "${ep_autogen_command}" STREQUAL "")
if(ep_autogen_command)
set(ep_autogen_redirect_to_file ${ep_redirect_to_file})
endif()
if(NOT "${ep_configure_command}" STREQUAL "")
if(ep_configure_command)
set(ep_configure_redirect_to_file ${ep_redirect_to_file})
endif()
else()
set(SCRIPT_EXTENSION sh)
endif()
if("${EP_${PROJNAME}_PKG_CONFIG}" STREQUAL "")
set(LINPHONE_BUILDER_PKG_CONFIG "${PKG_CONFIG_PROGRAM}")
else()
if(EP_${PROJNAME}_PKG_CONFIG)
set(LINPHONE_BUILDER_PKG_CONFIG "${EP_${PROJNAME}_PKG_CONFIG}")
else()
set(LINPHONE_BUILDER_PKG_CONFIG "${PKG_CONFIG_PROGRAM}")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/configure.sh.cmake ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_configure.sh)
......@@ -471,7 +471,7 @@ function(linphone_builder_add_external_project PROJNAME)
BUILD_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_build.${SCRIPT_EXTENSION}
INSTALL_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/EP_${PROJNAME}_install.${SCRIPT_EXTENSION}
)
elseif("${EP_${PROJNAME}_BUILD_METHOD}" STREQUAL "rpm")
elseif(EP_${PROJNAME}_BUILD_METHOD STREQUAL "rpm")
if(WIN32)
message(SEND_ERROR "rpm build not supported on WIN32")
......@@ -480,47 +480,47 @@ function(linphone_builder_add_external_project PROJNAME)
linphone_builder_create_autogen_command(${PROJNAME})
linphone_builder_create_configure_command(${PROJNAME})
if("${EP_${PROJNAME}_CONFIG_H_FILE}" STREQUAL "")
set(ep_config_h_file config.h)
else()
if(EP_${PROJNAME}_CONFIG_H_FILE)
set(ep_config_h_file ${EP_${PROJNAME}_CONFIG_H_FILE})
else()
set(ep_config_h_file config.h)
endif()
if("${EP_${PROJNAME}_INSTALL_TARGET}" STREQUAL "")
set(ep_install_target "install")
else()
if(EP_${PROJNAME}_INSTALL_TARGET)
set(ep_install_target "${EP_${PROJNAME}_INSTALL_TARGET}")
else()
set(ep_install_target "install")
endif()
if("${EP_${PROJNAME}_SPEC_FILE}" STREQUAL "")
message( SEND_ERROR "rpm build requires EP_${PROJNAME}_SPEC_FILE to be defined")
else()
if(EP_${PROJNAME}_SPEC_FILE)
set(LINPHONE_BUILDER_SPEC_FILE "${EP_${PROJNAME}_SPEC_FILE}")
else()
message(SEND_ERROR "rpm build requires EP_${PROJNAME}_SPEC_FILE to be defined")
endif()
# a distinctive name of the generated RPM. It is used to find the rpms to install
# in the install step. Defaults to $PROJNAME but could be something else
if("${EP_${PROJNAME}_RPMBUILD_NAME}" STREQUAL "")
set(LINPHONE_BUILDER_RPMBUILD_NAME "${PROJNAME}")
else()
if(EP_${PROJNAME}_RPMBUILD_NAME)
set(LINPHONE_BUILDER_RPMBUILD_NAME "${EP_${PROJNAME}_RPMBUILD_NAME}")
else()
set(LINPHONE_BUILDER_RPMBUILD_NAME "${PROJNAME}")
endif()
# a distinctive name of the generated RPM. It is used to find the rpms to install
# in the install step. Defaults to $PROJNAME but could be something else
if(NOT "${EP_${PROJNAME}_RPMBUILD_OPTIONS}" STREQUAL "")
if(EP_${PROJNAME}_RPMBUILD_OPTIONS)
set(LINPHONE_BUILDER_RPMBUILD_OPTIONS "${EP_${PROJNAME}_RPMBUILD_OPTIONS}")
endif()
set(LINPHONE_BUILDER_SPEC_PREFIX "${EP_${PROJNAME}_SPEC_PREXIX}")
if("${EP_${PROJNAME}_PKG_CONFIG}" STREQUAL "")
set(LINPHONE_BUILDER_PKG_CONFIG "${PKG_CONFIG_PROGRAM}")
else()
if(EP_${PROJNAME}_PKG_CONFIG)
set(LINPHONE_BUILDER_PKG_CONFIG "${EP_${PROJNAME}_PKG_CONFIG}")
else()
set(LINPHONE_BUILDER_PKG_CONFIG "${PKG_CONFIG_PROGRAM}")
endif()
if(NOT "${EP_${PROJNAME}_CONFIGURE_EXTRA_CMD}" STREQUAL "")
if(EP_${PROJNAME}_CONFIGURE_EXTRA_CMD)
set(LINPHONE_BUILDER_CONFIGURE_EXTRA_CMD "${EP_${PROJNAME}_CONFIGURE_EXTRA_CMD}")
endif()
......
......@@ -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