Commit 7ca6fa46 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Add sqlite3 builder.

parent 2bbc7c9d
......@@ -140,6 +140,7 @@ if(_target_found GREATER -1)
add_custom_target(TARGET_linphone ALL)
add_dependencies(TARGET_linphone_builder TARGET_linphone)
add_dependencies(TARGET_linphone TARGET_bellesip TARGET_ortp TARGET_ms2)
linphone_builder_add_builder_to_target(TARGET_linphone sqlite3)
linphone_builder_add_builder_to_target(TARGET_linphone xml2)
if(ENABLE_UNIT_TESTS)
linphone_builder_add_builder_to_target(TARGET_linphone cunit)
......
......@@ -24,12 +24,12 @@ set(EP_linphone_GIT_REPOSITORY "git://git.linphone.org/linphone.git")
if(${LINPHONE_BUILDER_LATEST})
set(EP_linphone_GIT_TAG "master")
else()
set(EP_linphone_GIT_TAG "02ed5338ed1f7cbbd4a1d5d3d49a02ab01ea9273")
set(EP_linphone_GIT_TAG "381744b0f4f2b68bb2c56fbbd7482808a312c830")
endif()
set(EP_linphone_CMAKE_OPTIONS )
set(EP_linphone_LINKING_TYPE "-DENABLE_STATIC=NO")
set(EP_linphone_DEPENDENCIES EP_bellesip EP_ortp EP_ms2 EP_xml2)
set(EP_linphone_DEPENDENCIES EP_bellesip EP_ortp EP_ms2 EP_sqlite3 EP_xml2)
if(ENABLE_VIDEO)
list(APPEND EP_linphone_CMAKE_OPTIONS "-DENABLE_VIDEO=YES")
else()
......
############################################################################
# sqlite3.cmake
# Copyright (C) 2014 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.
#
############################################################################
set(EP_sqlite3_URL "http://www.sqlite.org/2014/sqlite-amalgamation-3080702.zip")
set(EP_sqlite3_URL_HASH "MD5=10587262e4381358b707df75392c895f")
set(EP_sqlite3_PATCH_COMMAND "${CMAKE_COMMAND}" "-E" "copy" "${CMAKE_CURRENT_SOURCE_DIR}/builders/sqlite3/CMakeLists.txt" "<SOURCE_DIR>")
list(APPEND EP_sqlite3_PATCH_COMMAND "COMMAND" "${CMAKE_COMMAND}" "-E" "copy" "${CMAKE_CURRENT_SOURCE_DIR}/builders/sqlite3/FindSqlite3.cmake" "<SOURCE_DIR>")
set(EP_sqlite3_LINKING_TYPE "-DENABLE_STATIC=0")
############################################################################
# CMakeLists.txt
# Copyright (C) 2014 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.
#
############################################################################
cmake_minimum_required(VERSION 2.6)
project(SQLITE3 C)
option(ENABLE_STATIC "Build static library (default is shared library)." OFF)
set(SOURCE_FILES sqlite3.c)
if(ENABLE_STATIC)
add_library(sqlite3 STATIC ${SOURCE_FILES})
else()
add_library(sqlite3 SHARED ${SOURCE_FILES})
if(MSVC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/sqlite3.pdb
DESTINATION bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
endif()
endif()
install(TARGETS sqlite3
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
file(GLOB HEADER_FILES "*.h")
install(FILES ${HEADER_FILES}
DESTINATION include/sqlite3
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/FindSqlite3.cmake
DESTINATION share/cmake/Modules
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
############################################################################
# FindSqlite3.cmake
# Copyright (C) 2014 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.
#
############################################################################
#
# - Find the sqlite3 include file and library
#
# SQLITE3_FOUND - system has sqlite3
# SQLITE3_INCLUDE_DIRS - the sqlite3 include directory
# SQLITE3_LIBRARIES - The libraries needed to use sqlite3
set(_SQLITE3_ROOT_PATHS
${WITH_SQLITE3}
${CMAKE_INSTALL_PREFIX}
)
find_path(SQLITE3_INCLUDE_DIRS
NAMES sqlite3/sqlite3.h
HINTS _SQLITE3_ROOT_PATHS
PATH_SUFFIXES include
)
if(SQLITE3_INCLUDE_DIRS)
set(HAVE_SQLITE3_SQLITE3_H 1)
endif()
find_library(SQLITE3_LIBRARIES
NAMES sqlite3
HINTS ${_SQLITE3_ROOT_PATHS}
PATH_SUFFIXES bin lib
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Sqlite3
DEFAULT_MSG
SQLITE3_INCLUDE_DIRS SQLITE3_LIBRARIES HAVE_SQLITE3_SQLITE3_H
)
mark_as_advanced(SQLITE3_INCLUDE_DIRS SQLITE3_LIBRARIES HAVE_SQLITE3_SQLITE3_H)
......@@ -111,6 +111,9 @@ if(NOT MSVC)
set(EP_opus_LINKING_TYPE "--enable-static" "--disable-shared" "--with-pic")
endif()
# sqlite3
set(EP_sqlite3_LINKING_TYPE "-DENABLE_STATIC=1")
# v4l
set(EP_v4l_LINKING_TYPE "--enable-static" "--disable-shared" "--with-pic")
......
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