mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
chore(build): use search_dependency to add AppImageUpdaterBridge
This commit is contained in:
parent
e50b3bbd5c
commit
bcab4514e4
|
@ -56,6 +56,11 @@ if(APPLE)
|
||||||
/usr/local/opt/openal-soft/lib/pkgconfig:$ENV{PKG_CONFIG_PATH})
|
/usr/local/opt/openal-soft/lib/pkgconfig:$ENV{PKG_CONFIG_PATH})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(${APPIMAGE_UPDATER_BRIDGE})
|
||||||
|
set(ENV{PKG_CONFIG_PATH}
|
||||||
|
/usr/local/lib/pkgconfig:$ENV{PKG_CONFIG_PATH})
|
||||||
|
endif()
|
||||||
|
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND brew --prefix qt5
|
COMMAND brew --prefix qt5
|
||||||
OUTPUT_VARIABLE QT_PREFIX_PATH
|
OUTPUT_VARIABLE QT_PREFIX_PATH
|
||||||
|
@ -691,12 +696,16 @@ endif()
|
||||||
|
|
||||||
if(${UPDATE_CHECK})
|
if(${UPDATE_CHECK})
|
||||||
add_definitions(-DUPDATE_CHECK_ENABLED=1)
|
add_definitions(-DUPDATE_CHECK_ENABLED=1)
|
||||||
if(APPIMAGE_UPDATER_BRIDGE_SRC_DIR AND APPIMAGE_UPDATER_BRIDGE_BUILD_DIR)
|
if(${APPIMAGE_UPDATER_BRIDGE})
|
||||||
|
search_dependency(AIUB PACKAGE AppImageUpdaterBridge)
|
||||||
|
if(AIUB_FOUND)
|
||||||
message(STATUS "using AppImageUpdaterBridge")
|
message(STATUS "using AppImageUpdaterBridge")
|
||||||
add_definitions(-DAPPIMAGE_UPDATER_BRIDGE_ENABLED=1)
|
add_definitions(-DAPPIMAGE_UPDATER_BRIDGE_ENABLED=1)
|
||||||
include_directories(${APPIMAGE_UPDATER_BRIDGE_SRC_DIR})
|
|
||||||
else()
|
else()
|
||||||
message(STATUS "NOT using AppImageUpdaterBridge")
|
message(STATUS "cannot find AppImageUpdaterBridge , ignoring cmake flag")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
message(STATUS "not using AppImageUpdaterBridge")
|
||||||
endif()
|
endif()
|
||||||
set(${PROJECT_NAME}_SOURCES ${${PROJECT_NAME}_SOURCES}
|
set(${PROJECT_NAME}_SOURCES ${${PROJECT_NAME}_SOURCES}
|
||||||
src/net/updatecheck.cpp
|
src/net/updatecheck.cpp
|
||||||
|
@ -737,17 +746,9 @@ add_library(${PROJECT_NAME}_static
|
||||||
${${PROJECT_NAME}_SOURCES}
|
${${PROJECT_NAME}_SOURCES}
|
||||||
${${PROJECT_NAME}_QM_FILES}
|
${${PROJECT_NAME}_QM_FILES}
|
||||||
${${PROJECT_NAME}_RESOURCES})
|
${${PROJECT_NAME}_RESOURCES})
|
||||||
|
target_link_libraries(${PROJECT_NAME}_static
|
||||||
if(APPIMAGE_UPDATER_BRIDGE_BUILD_DIR AND APPIMAGE_UPDATER_BRIDGE_SRC_DIR AND UPDATE_CHECK)
|
|
||||||
target_link_libraries(${PROJECT_NAME}_static
|
|
||||||
${CMAKE_REQUIRED_LIBRARIES}
|
|
||||||
${ALL_LIBRARIES}
|
|
||||||
${APPIMAGE_UPDATER_BRIDGE_BUILD_DIR}/libAppImageUpdaterBridge.a)
|
|
||||||
else()
|
|
||||||
target_link_libraries(${PROJECT_NAME}_static
|
|
||||||
${CMAKE_REQUIRED_LIBRARIES}
|
${CMAKE_REQUIRED_LIBRARIES}
|
||||||
${ALL_LIBRARIES})
|
${ALL_LIBRARIES})
|
||||||
endif()
|
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME}
|
add_executable(${PROJECT_NAME}
|
||||||
WIN32
|
WIN32
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
# THE SOFTWARE.
|
# THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
# Fail out on error
|
# Fail out on error
|
||||||
set -exuo pipefail
|
set -exuo pipefail
|
||||||
|
|
||||||
|
@ -114,7 +113,7 @@ make install
|
||||||
# qTox
|
# qTox
|
||||||
git clone "$AUB_GIT" "$AUB_SRC_DIR"
|
git clone "$AUB_GIT" "$AUB_SRC_DIR"
|
||||||
cd "$AUB_SRC_DIR" # we need to checkout first
|
cd "$AUB_SRC_DIR" # we need to checkout first
|
||||||
git checkout tags/v1.1.1
|
git checkout tags/v1.1.2
|
||||||
mkdir $AUB_BUILD_DIR
|
mkdir $AUB_BUILD_DIR
|
||||||
cd $AUB_BUILD_DIR
|
cd $AUB_BUILD_DIR
|
||||||
cmake .. -DLOGGING_DISABLED=ON
|
cmake .. -DLOGGING_DISABLED=ON
|
||||||
|
|
Loading…
Reference in New Issue
Block a user