Skip to content
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

[BUILD] Added macros resolved in srt.h to pkg-config file #2806

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Added forcefully placement of the macros in version.h for systems tha…
…t do not use pkg-config
Mikołaj Małecki committed Oct 4, 2023
commit ee27aa9a71c0765b0ff4c470983c2706e558415e
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -44,6 +44,7 @@ set_if(SUNOS "${SYSNAME_LC}" MATCHES "sunos")
set_if(POSIX LINUX OR DARWIN OR BSD OR SUNOS OR ANDROID OR (CYGWIN AND CYGWIN_USE_POSIX))
set_if(SYMLINKABLE LINUX OR DARWIN OR BSD OR SUNOS OR CYGWIN OR GNU)
set_if(NEED_DESTINATION ${CMAKE_VERSION} VERSION_LESS "3.14.0")
set_if(PKG_CONFIG_CAPABLE LINUX OR GNU OR SUNOS OR BSD)

include(GNUInstallDirs)

@@ -160,7 +161,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "^GNU$" AND CMAKE_CXX_COMPILER_VERSION VERSION
endif()



# options
option(CYGWIN_USE_POSIX "Should the POSIX API be used for cygwin. Ignored if the system isn't cygwin." OFF)
option(ENABLE_CXX11 "Should the c++11 parts (srt-live-transmit) be enabled" ${ENABLE_CXX11_DEFAULT})
@@ -203,6 +203,16 @@ if (ATOMIC_USE_SRT_SYNC_MUTEX)
add_definitions(-DATOMIC_USE_SRT_SYNC_MUTEX=1)
endif()

# Postfix: ENABLE_CONFIG_HEADER must be forcefully turned on on build systems
# that do not utilize pkg-config.

if (NOT PKG_CONFIG_CAPABLE)
if (NOT ENABLE_CONFIG_HEADER)
message(INFO "Configuration forcefully placed in version.h file as this platform doesn't feature pkg-config.")
endif()
set (ENABLE_CONFIG_HEADER ON)
endif()

set(TARGET_srt "srt" CACHE STRING "The name for the SRT library")

# Declare that the config is known when compiling SRT itself and