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

cmake: Support configuring as subproject #640

Merged
merged 1 commit into from
Feb 7, 2023
Merged
Changes from all commits
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
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.12)

project(libsrtp2 VERSION 2.6.0 LANGUAGES C)

set(PACKAGE_VERSION ${CMAKE_PROJECT_VERSION})
set(PACKAGE_STRING "${CMAKE_PROJECT_NAME} ${CMAKE_PROJECT_VERSION}")
set(PACKAGE_VERSION ${PROJECT_VERSION})
set(PACKAGE_STRING "${PROJECT_NAME} ${PROJECT_VERSION}")

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

Expand Down Expand Up @@ -252,7 +252,7 @@ add_library(srtp2
)
add_library(libSRTP::srtp2 ALIAS srtp2)

set_target_properties(srtp2 PROPERTIES VERSION ${CMAKE_PROJECT_VERSION})
set_target_properties(srtp2 PROPERTIES VERSION ${PROJECT_VERSION})

target_include_directories(srtp2 PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/crypto/include>
Expand Down Expand Up @@ -398,7 +398,7 @@ configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
# Generate the version file for the config file
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/libSRTPConfigVersion.cmake"
VERSION "${CMAKE_PROJECT_VERSION}"
VERSION "${PROJECT_VERSION}"
COMPATIBILITY AnyNewerVersion
)

Expand Down