Commit 68b47185 authored by Ghislain MARY's avatar Ghislain MARY

Improve handling of conditions in CMake.

parent 359ee0e6
......@@ -30,7 +30,7 @@ list(APPEND EP_flexisip_DEPENDENCIES EP_libodbmysql)
set(EP_flexisip_LINKING_TYPE "--disable-static" "--enable-shared")
set(EP_flexisip_BUILD_METHOD "autotools")
set(EP_flexisip_USE_AUTOGEN "yes")
set(EP_flexisip_USE_AUTOGEN True)
set(EP_flexisip_CONFIGURE_OPTIONS )
set(EP_flexisip_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
......
......@@ -25,7 +25,7 @@ set(EP_msx264_GIT_TAG_LATEST "master")
set(EP_msx264_GIT_TAG "fefdfbe8d098ca4e3b5f6901d761a1bb66f5dd83")
set(EP_msx264_BUILD_METHOD "autotools")
set(EP_msx264_USE_AUTOGEN "yes")
set(EP_msx264_USE_AUTOGEN True)
set(EP_msx264_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
"--host=${LINPHONE_BUILDER_HOST}"
......
......@@ -25,9 +25,9 @@ set(EP_ortp_GIT_TAG_LATEST "master")
set(EP_ortp_GIT_TAG "0.24.2")
set(EP_ortp_EXTERNAL_SOURCE_PATHS "oRTP" "ortp" "linphone/oRTP")
if("${EP_ortp_FORCE_AUTOTOOLS}" STREQUAL "yes")
if(EP_ortp_FORCE_AUTOTOOLS)
set(EP_ortp_LINKING_TYPE "--enable-static")
set(EP_ortp_USE_AUTOGEN "yes")
set(EP_ortp_USE_AUTOGEN True)
else()
set(EP_ortp_LINKING_TYPE "-DENABLE_STATIC=NO")
endif()
......
......@@ -30,8 +30,8 @@ set(EP_sofiasip_GIT_TAG "0987c2ac14512ba5aedc9b135e40c3bef007938b")
set(EP_sofiasip_DEPENDENCIES )
set(EP_sofiasip_LINKING_TYPE "--disable-static" "--enable-shared")
set(EP_sofiasip_BUILD_METHOD "autotools")
set(EP_sofiasip_USE_AUTOGEN "yes")
set(EP_sofiasio_BUILD_IN_SOURCE "yes")
set(EP_sofiasip_USE_AUTOGEN True)
set(EP_sofiasio_BUILD_IN_SOURCE True)
set(EP_sofiasip_CONFIGURE_OPTIONS )
set(EP_sofiasip_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
......
......@@ -27,7 +27,7 @@ set(EP_unixodbc_GIT_TAG "9558dcfdfa89c75699d4d47c0cf4ae14962a3374")
set(EP_unixodbc_DEPENDENCIES )
set(EP_unixodbc_LINKING_TYPE "--disable-static" "--enable-shared")
set(EP_unixodbc_BUILD_METHOD "autotools")
set(EP_unixodbc_USE_AUTOGEN "yes")
set(EP_unixodbc_USE_AUTOGEN True)
set(EP_unixodbc_CONFIGURE_OPTIONS )
set(EP_unixodbc_CROSS_COMPILATION_OPTIONS
"--prefix=${CMAKE_INSTALL_PREFIX}"
......@@ -38,4 +38,4 @@ list(APPEND EP_unixodbc_CONFIGURE_OPTIONS "--enable-drivers" "--enable-driver-co
set(EP_unixodbc_SPEC_FILE "unixodbc.spec")
set(EP_unixodbc_RPMBUILD_NAME "unixODBC")
set(EP_unixodbc_PATCH_COMMAND "${CMAKE_COMMAND}" "-E" "copy" "<SOURCE_DIR>/${EP_unixodbc_SPEC_FILE}" "<BINARY_DIR>")
\ No newline at end of file
set(EP_unixodbc_PATCH_COMMAND "${CMAKE_COMMAND}" "-E" "copy" "<SOURCE_DIR>/${EP_unixodbc_SPEC_FILE}" "<BINARY_DIR>")
......@@ -33,6 +33,6 @@ set(EP_x264_CONFIGURE_OPTIONS
)
set(EP_x264_LINKING_TYPE "--enable-shared")
set(EP_x264_CONFIGURE_ENV "CC=$CC")
set(EP_x264_BUILD_IN_SOURCE "yes")
set(EP_x264_BUILD_IN_SOURCE True)
set(EP_x264_INSTALL_TARGET "install-lib-shared")
set(EP_x264_DEPENDENCIES EP_ffmpeg)
......@@ -445,7 +445,7 @@ macro(linphone_builder_set_ep_directories PROJNAME)
else()
set(ep_source "${ep_base}/Source/EP_${PROJNAME}")
endif()
if("${EP_${PROJNAME}_BUILD_IN_SOURCE}" STREQUAL "yes")
if(EP_${PROJNAME}_BUILD_IN_SOURCE)
set(ep_build "${ep_source}")
else()
set(ep_build "${ep_base}/Build/${PROJNAME}")
......@@ -454,8 +454,8 @@ endmacro()
macro(linphone_builder_create_autogen_command PROJNAME)
if("${EP_${PROJNAME}_USE_AUTOGEN}" STREQUAL "yes")
if("${EP_${PROJNAME}_CONFIGURE_OPTIONS_PASSED_TO_AUTOGEN}" STREQUAL "yes")
if(EP_${PROJNAME}_USE_AUTOGEN)
if(EP_${PROJNAME}_CONFIGURE_OPTIONS_PASSED_TO_AUTOGEN)
set(ep_autogen_options "")
foreach(OPTION ${EP_${PROJNAME}_CROSS_COMPILATION_OPTIONS} ${EP_${PROJNAME}_LINKING_TYPE} ${EP_${PROJNAME}_CONFIGURE_OPTIONS})
set(ep_autogen_options "${ep_autogen_options} \"${OPTION}\"")
......@@ -469,7 +469,7 @@ endmacro()
macro(linphone_builder_create_configure_command PROJNAME)
if("${EP_${PROJNAME}_CONFIGURE_OPTIONS_PASSED_TO_AUTOGEN}" STREQUAL "yes")
if(EP_${PROJNAME}_CONFIGURE_OPTIONS_PASSED_TO_AUTOGEN)
set(ep_configure_command "")
else()
set(ep_configure_options "")
......
......@@ -116,7 +116,7 @@ else() # Windows
endif()
# needed *before* the include
set(EP_ortp_FORCE_AUTOTOOLS "yes")
set(EP_ortp_FORCE_AUTOTOOLS True)
......@@ -184,4 +184,4 @@ if(PLATFORM STREQUAL "Debian")
CHECK_PROGRAM(fakeroot)
endif()
set(LINPHONE_BUILDER_RPMBUILD_GLOBAL_OPTION ${RPMBUILD_OPTIONS})
\ No newline at end of file
set(LINPHONE_BUILDER_RPMBUILD_GLOBAL_OPTION ${RPMBUILD_OPTIONS})
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