-
Notifications
You must be signed in to change notification settings - Fork 863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix issue: wrong Darwin value for iOS #2846
Changes from all commits
be1595b
26ce98a
bc6626f
57d1108
2343e3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
# | ||
|
||
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR) | ||
cmake_minimum_required (VERSION 3.5 FATAL_ERROR) | ||
set (SRT_VERSION 1.5.3) | ||
|
||
set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/scripts") | ||
|
@@ -24,17 +24,21 @@ else() | |
project(SRT VERSION ${SRT_VERSION} LANGUAGES C CXX) | ||
endif() | ||
|
||
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.1) | ||
cmake_policy(SET CMP0054 NEW) | ||
endif () | ||
|
||
include(FindPkgConfig) | ||
# XXX See 'if (MINGW)' condition below, may need fixing. | ||
include(FindThreads) | ||
include(CheckFunctionExists) | ||
|
||
# Platform shortcuts | ||
string(TOLOWER ${CMAKE_SYSTEM_NAME} SYSNAME_LC) | ||
set_if(DARWIN (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||
OR (${CMAKE_SYSTEM_NAME} MATCHES "iOS") | ||
OR (${CMAKE_SYSTEM_NAME} MATCHES "tvOS") | ||
OR (${CMAKE_SYSTEM_NAME} MATCHES "watchOS")) | ||
set_if(DARWIN (CMAKE_SYSTEM_NAME MATCHES "Darwin") | ||
OR (CMAKE_SYSTEM_NAME MATCHES "iOS") | ||
OR (CMAKE_SYSTEM_NAME MATCHES "tvOS") | ||
OR (CMAKE_SYSTEM_NAME MATCHES "watchOS")) | ||
set_if(LINUX ${CMAKE_SYSTEM_NAME} MATCHES "Linux") | ||
set_if(BSD ${SYSNAME_LC} MATCHES "bsd$") | ||
set_if(MICROSOFT WIN32 AND (NOT MINGW AND NOT CYGWIN)) | ||
Comment on lines
+38
to
44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am always confused with those There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CMake documentation defines it this way:
I'm not sure how CMake handles it in every single case, however by using ${var} you risk that if this resolves to an empty string, you effectively cause a syntax error. OTOH I have no idea what exactly happens if it resolves to a name of an existing variable. Probably the direct string and an effective string resolved from a variable are also distinguished. Not sure how it exactly works provided that the conditional statement is simply placed as argument for
Anyway, if you are certain that a particular variable exists, you can use just as well Frankly I don't understand, what this change is here and actually when I compare it to the latest version, it just changes |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't raise the minimum required CMake version in a patch release1.5.4 scheduled to be the next one.
In any case there should be a strong motivation for raising this requirement, as it affects portability of SRT a bit (requires additional effort to update CMake on some older platforms).