Commit 5804d855 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Updated cmake files

parent 04c24011
......@@ -94,6 +94,7 @@ endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/config.h PROPERTIES GENERATED ON)
add_definitions("-DHAVE_CONFIG_H")
set(STRICT_OPTIONS_CPP )
set(STRICT_OPTIONS_C )
......@@ -120,9 +121,35 @@ 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 "belcard")
endif()
add_subdirectory(include)
add_subdirectory(src)
if(ENABLE_UNIT_TESTS)
# add_subdirectory(tests)
endif()
\ No newline at end of file
endif()
include(CMakePackageConfigHelpers)
export(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/BelcardTargets.cmake"
)
configure_file(cmake/BelcardConfig.cmake
"${CMAKE_CURRENT_BINARY_DIR}/BelcardConfig.cmake"
COPYONLY
)
set(ConfigPackageLocation lib/cmake/Belcard)
install(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE BelcardTargets.cmake
DESTINATION ${ConfigPackageLocation}
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/BelcardConfig.cmake"
DESTINATION ${ConfigPackageLocation}
)
\ No newline at end of file
############################################################################
# BelcardConfig.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 belcard package.
# It defines the following variables:
#
# BELCARD_FOUND - system has belcard
# BELCARD_INCLUDE_DIRS - the belcard include directory
# BELCARD_LIBRARIES - The libraries needed to use belcard
if(NOT LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${CMAKE_CURRENT_LIST_DIR}/BelcardTargets.cmake")
endif()
get_filename_component(BELCARD_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
set(BELCARD_INCLUDE_DIRS "${EP_belcard_INCLUDE_DIR}")
else()
set(BELCARD_INCLUDE_DIRS "${BELCARD_CMAKE_DIR}/../../../include")
endif()
set(BELCARD_LIBRARIES belcard)
set(BELCARD_FOUND 1)
......@@ -33,7 +33,7 @@ set(_BELR_ROOT_PATHS
find_path(BELR_INCLUDE_DIRS
NAMES belr.hh
HINTS _BELR_ROOT_PATHS
PATH_SUFFIXES include include/belr
PATH_SUFFIXES include/belr
)
if(BELR_INCLUDE_DIRS)
......
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