Commit 0f070f24 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Change where we compute the STATE variable

parent e7359def
......@@ -23,7 +23,6 @@
cmake_minimum_required(VERSION 3.1)
project(linphone VERSION 5.0.0 LANGUAGES C CXX)
set(LINPHONE_MAJOR_VERSION ${PROJECT_VERSION_MAJOR})
set(LINPHONE_MINOR_VERSION ${PROJECT_VERSION_MINOR})
set(LINPHONE_MICRO_VERSION ${PROJECT_VERSION_PATCH})
......
......@@ -25,15 +25,9 @@ if(ENABLE_DOC OR ENABLE_CXX_WRAPPER OR ENABLE_CSHARP_WRAPPER OR ENABLE_JAVA_WRAP
if(DOXYGEN_FOUND)
set(top_srcdir "${PROJECT_SOURCE_DIR}")
# Check git describe to see if we are on a release or not
set(LINPHONE_STATE "snapshots")
execute_process(COMMAND ${GIT_EXECUTABLE} describe OUTPUT_VARIABLE GIT_DESC)
if(NOT GIT_DESC MATCHES ".*(alpha|beta).*")
set(LINPHONE_STATE "releases")
endif()
# Remove everything after the last point in LINPHONE_VERSION (4.5.0 --> 4.5) to create STRIPPED_LINPHONE_VERSION
string(REGEX REPLACE "\\.[^.]*$" "" STRIPPED_LINPHONE_VERSION ${LINPHONE_VERSION})
# Replace @LINPHONE_STATE@ and @STRIPPED_LINPHONE_VERSION@ in site main page
# Replace @LINPHONESDK_STATE@ and @STRIPPED_LINPHONE_VERSION@ in site main page
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.dox.in ${CMAKE_CURRENT_BINARY_DIR}/doxygen.dox)
set(DOXYGEN_INPUT "")
......
......@@ -11,11 +11,11 @@
* Liblinphone combines our media processing and streaming toolkit (Mediastreamer2) with our user-agent library for SIP signaling (belle-sip).
* Liblinphone has support for a variety of languages, each one has its own reference documentation:
*
* - C (https://linphone.org/@LINPHONE_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/c)
* - C++ (https://linphone.org/@LINPHONE_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/c++)
* - Swift (https://linphone.org/@LINPHONE_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/swift)
* - Java (https://linphone.org/@LINPHONE_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/java)
* - C# (https://linphone.org/@LINPHONE_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/cs)
* - C (https://linphone.org/@LINPHONESDK_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/c)
* - C++ (https://linphone.org/@LINPHONESDK_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/c++)
* - Swift (https://linphone.org/@LINPHONESDK_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/swift)
* - Java (https://linphone.org/@LINPHONESDK_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/java)
* - C# (https://linphone.org/@LINPHONESDK_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/cs)
* - Python (coming soon)
*
* Liblinphone is distributed under GPLv3 (https://www.gnu.org/licenses/gpl-3.0.html). Please understand the licencing details before using it!
......
......@@ -114,15 +114,9 @@ if(ENABLE_DOC OR ENABLE_CXX_WRAPPER)
if(DOXYGEN_FOUND)
set(top_srcdir "${PROJECT_SOURCE_DIR}")
# Check git describe to see if we are on a release or not
set(LINPHONE_STATE "snapshots")
execute_process(COMMAND ${GIT_EXECUTABLE} describe OUTPUT_VARIABLE GIT_DESC)
if(NOT GIT_DESC MATCHES ".*(alpha|beta).*")
set(LINPHONE_STATE "releases")
endif()
# Remove everything after the last point in LINPHONE_VERSION (4.5.0 --> 4.5) to create STRIPPED_LINPHONE_VERSION
string(REGEX REPLACE "\\.[^.]*$" "" STRIPPED_LINPHONE_VERSION ${LINPHONE_VERSION})
# Replace @LINPHONE_STATE@ and @STRIPPED_LINPHONE_VERSION@ in site main page
# Replace @LINPHONESDK_STATE@ and @STRIPPED_LINPHONE_VERSION@ in site main page
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.dox.in ${CMAKE_CURRENT_BINARY_DIR}/doxygen.dox)
set(DOXYGEN_INPUT "")
......
......@@ -11,11 +11,11 @@
* Liblinphone combines our media processing and streaming toolkit (Mediastreamer2) with our user-agent library for SIP signaling (belle-sip).
* Liblinphone has support for a variety of languages, each one has its own reference documentation:
*
* - C (https://linphone.org/@LINPHONE_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/c)
* - C++ (https://linphone.org/@LINPHONE_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/c++)
* - Swift (https://linphone.org/@LINPHONE_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/swift)
* - Java (https://linphone.org/@LINPHONE_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/java)
* - C# (https://linphone.org/@LINPHONE_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/cs)
* - C (https://linphone.org/@LINPHONESDK_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/c)
* - C++ (https://linphone.org/@LINPHONESDK_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/c++)
* - Swift (https://linphone.org/@LINPHONESDK_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/swift)
* - Java (https://linphone.org/@LINPHONESDK_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/java)
* - C# (https://linphone.org/@LINPHONESDK_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/cs)
* - Python (coming soon)
*
* Liblinphone is distributed under GPLv3 (https://www.gnu.org/licenses/gpl-3.0.html). Please understand the licencing details before using it!
......
......@@ -50,22 +50,15 @@ if(ENABLE_DOC OR ENABLE_CSHARP_WRAPPER)
COPY "${CMAKE_CURRENT_SOURCE_DIR}/docfx_project"
DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/"
)
# Check git describe to see if we are on a release or not
set(LINPHONE_STATE "snapshots")
execute_process(COMMAND ${GIT_EXECUTABLE} describe OUTPUT_VARIABLE GIT_DESC)
if(NOT GIT_DESC MATCHES ".*(alpha|beta).*")
set(LINPHONE_STATE "releases")
endif()
# Remove everything after the last point in LINPHONE_VERSION (4.5.0 --> 4.5) to create STRIPPED_LINPHONE_VERSION
string(REGEX REPLACE "\\.[^.]*$" "" STRIPPED_LINPHONE_VERSION ${LINPHONE_VERSION})
# Replace @LINPHONE_STATE@ and @STRIPPED_LINPHONE_VERSION@ in site main page
# Replace @LINPHONESDK_STATE@ and @STRIPPED_LINPHONE_VERSION@ in site main page
configure_file(
"${CMAKE_CURRENT_BINARY_DIR}/docfx_project/index.md"
"${CMAKE_CURRENT_BINARY_DIR}/docfx_project/index.md"
)
# Replace @LINPHONE_STATE@ and @STRIPPED_LINPHONE_VERSION@ version.txt.in, this
# Replace @LINPHONESDK_STATE@ and @STRIPPED_LINPHONE_VERSION@ version.txt.in, this
# file will be used for csharp doc upload
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/version.txt.in"
......
......@@ -6,11 +6,11 @@ Liblinphone is a high-level open source library that integrates all the SIP voic
Liblinphone combines our media processing and streaming toolkit (Mediastreamer2) with our user-agent library for SIP signaling (belle-sip). Liblinphone has support for a variety of languages, each one has its own reference documentation:
- C (https://linphone.org/@LINPHONE_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/c)
- C++ (https://linphone.org/@LINPHONE_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/c++)
- Swift (https://linphone.org/@LINPHONE_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/swift)
- Java (https://linphone.org/@LINPHONE_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/java)
- C# (https://linphone.org/@LINPHONE_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/cs)
- C (https://linphone.org/@LINPHONESDK_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/c)
- C++ (https://linphone.org/@LINPHONESDK_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/c++)
- Swift (https://linphone.org/@LINPHONESDK_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/swift)
- Java (https://linphone.org/@LINPHONESDK_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/java)
- C# (https://linphone.org/@LINPHONESDK_STATE@/docs/liblinphone/@STRIPPED_LINPHONE_VERSION@/cs)
- Python (coming soon)
Liblinphone is distributed under GPLv3 (https://www.gnu.org/licenses/gpl-3.0.html). Please understand the licencing details before using it!
......
STRIPPED_LINPHONE_VERSION=@STRIPPED_LINPHONE_VERSION@
LINPHONE_VERSION=@LINPHONE_VERSION@
LINPHONE_STATE=@LINPHONE_STATE@
\ No newline at end of file
LINPHONESDK_STATE=@LINPHONESDK_STATE@
\ No newline at end of file
......@@ -22,18 +22,12 @@
set(jni_sources "${CMAKE_CURRENT_BINARY_DIR}/src/linphone_jni.cc")
set(LINPHONE_STATE "snapshots")
execute_process(COMMAND ${GIT_EXECUTABLE} describe OUTPUT_VARIABLE GIT_DESC)
if(NOT GIT_DESC MATCHES ".*(alpha|beta).*")
set(LINPHONE_STATE "releases")
endif()
# Remove everything after the last point in LINPHONE_VERSION (4.5.0 --> 4.5) to create STRIPPED_LINPHONE_VERSION
string(REGEX REPLACE "\\.[^.]*$" "" STRIPPED_LINPHONE_VERSION ${LINPHONE_VERSION})
add_custom_command(OUTPUT "${jni_sources}"
COMMAND ${CMAKE_COMMAND} -E remove -f java/org/linphone/core/* src/*
COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/genwrapper.py" "${PROJECT_BINARY_DIR}/coreapi/help/doc/doxygen/xml" "-o" "${CMAKE_CURRENT_BINARY_DIR}" "-v" "${STRIPPED_LINPHONE_VERSION}" -d "${LINPHONE_STATE}"
COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/genwrapper.py" "${PROJECT_BINARY_DIR}/coreapi/help/doc/doxygen/xml" "-o" "${CMAKE_CURRENT_BINARY_DIR}" "-v" "${STRIPPED_LINPHONE_VERSION}" "-d" "${LINPHONESDK_STATE}"
DEPENDS ${PROJECT_SOURCE_DIR}/tools/genapixml.py ${LINPHONE_HEADER_FILES}
${PROJECT_SOURCE_DIR}/tools/metaname.py
${PROJECT_SOURCE_DIR}/tools/metadoc.py
......
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