Commit 55ce0e2c authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Updated cmake files

parent aff04311
......@@ -97,5 +97,29 @@ if(STRICT_OPTIONS_C)
list(REMOVE_DUPLICATES STRICT_OPTIONS_C)
endif()
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
set(EXPORT_TARGETS_NAME "LinphoneBuilder")
else()
set(EXPORT_TARGETS_NAME "belr")
endif()
add_subdirectory(include)
add_subdirectory(src)
\ No newline at end of file
add_subdirectory(src)
include(CMakePackageConfigHelpers)
export(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/BelrTargets.cmake"
)
configure_file(cmake/BelrConfig.cmake
"${CMAKE_CURRENT_BINARY_DIR}/BelrConfig.cmake"
COPYONLY
)
set(ConfigPackageLocation lib/cmake/Belr)
install(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE BelrTargets.cmake
DESTINATION ${ConfigPackageLocation}
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/BelrConfig.cmake"
DESTINATION ${ConfigPackageLocation}
)
\ No newline at end of file
############################################################################
# BelrConfig.cmake
# Copyright (C) 2015 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
#
# Config file for the belr package.
# It defines the following variables:
#
# BELR_FOUND - system has belr
# BELR_INCLUDE_DIRS - the belr include directory
# BELR_LIBRARIES - The libraries needed to use belr
if(NOT LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${CMAKE_CURRENT_LIST_DIR}/BelrTargets.cmake")
endif()
get_filename_component(BELR_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
set(BELR_INCLUDE_DIRS "${EP_belr_INCLUDE_DIR}")
else()
set(BELR_INCLUDE_DIRS "${BELR_CMAKE_DIR}/../../../include")
endif()
set(BELR_LIBRARIES belr)
set(BELR_FOUND 1)
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