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})
|
||||
endif()
|
||||
|
||||
if(${APPIMAGE_UPDATER_BRIDGE})
|
||||
set(ENV{PKG_CONFIG_PATH}
|
||||
/usr/local/lib/pkgconfig:$ENV{PKG_CONFIG_PATH})
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND brew --prefix qt5
|
||||
OUTPUT_VARIABLE QT_PREFIX_PATH
|
||||
|
@ -691,12 +696,16 @@ endif()
|
|||
|
||||
if(${UPDATE_CHECK})
|
||||
add_definitions(-DUPDATE_CHECK_ENABLED=1)
|
||||
if(APPIMAGE_UPDATER_BRIDGE_SRC_DIR AND APPIMAGE_UPDATER_BRIDGE_BUILD_DIR)
|
||||
message(STATUS "using AppImageUpdaterBridge")
|
||||
add_definitions(-DAPPIMAGE_UPDATER_BRIDGE_ENABLED=1)
|
||||
include_directories(${APPIMAGE_UPDATER_BRIDGE_SRC_DIR})
|
||||
if(${APPIMAGE_UPDATER_BRIDGE})
|
||||
search_dependency(AIUB PACKAGE AppImageUpdaterBridge)
|
||||
if(AIUB_FOUND)
|
||||
message(STATUS "using AppImageUpdaterBridge")
|
||||
add_definitions(-DAPPIMAGE_UPDATER_BRIDGE_ENABLED=1)
|
||||
else()
|
||||
message(STATUS "cannot find AppImageUpdaterBridge , ignoring cmake flag")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "NOT using AppImageUpdaterBridge")
|
||||
message(STATUS "not using AppImageUpdaterBridge")
|
||||
endif()
|
||||
set(${PROJECT_NAME}_SOURCES ${${PROJECT_NAME}_SOURCES}
|
||||
src/net/updatecheck.cpp
|
||||
|
@ -737,17 +746,9 @@ add_library(${PROJECT_NAME}_static
|
|||
${${PROJECT_NAME}_SOURCES}
|
||||
${${PROJECT_NAME}_QM_FILES}
|
||||
${${PROJECT_NAME}_RESOURCES})
|
||||
|
||||
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}
|
||||
${ALL_LIBRARIES})
|
||||
endif()
|
||||
target_link_libraries(${PROJECT_NAME}_static
|
||||
${CMAKE_REQUIRED_LIBRARIES}
|
||||
${ALL_LIBRARIES})
|
||||
|
||||
add_executable(${PROJECT_NAME}
|
||||
WIN32
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
|
||||
# Fail out on error
|
||||
set -exuo pipefail
|
||||
|
||||
|
@ -114,7 +113,7 @@ make install
|
|||
# qTox
|
||||
git clone "$AUB_GIT" "$AUB_SRC_DIR"
|
||||
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
|
||||
cd $AUB_BUILD_DIR
|
||||
cmake .. -DLOGGING_DISABLED=ON
|
||||
|
|
Loading…
Reference in New Issue
Block a user