Skip to content

Commit

Permalink
Fix more build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAssassin committed Jan 17, 2022
1 parent 8be65f1 commit a2db215
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ include(GNUInstallDirs)

option(USE_SYSTEM_ZSYNC2 OFF "Use existing libzsync2 installed on system (or inside CMAKE_PREFIX_PATH)")
if(USE_SYSTEM_ZSYNC2)
set(USE_SYSTEM_CPR ON)

# we use cpr in AppImageUpdate, too
find_package(cpr REQUIRED)
add_library(cpr ALIAS cpr::cpr)

# note: find_package calls must be made in the same or a parent scope
find_package(zsync2 REQUIRED)
endif()
Expand Down
2 changes: 1 addition & 1 deletion ci/Dockerfile.i386
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apt-get update && \
build-essential libssl-dev autoconf automake libtool \
wget vim-common desktop-file-utils pkgconf \
libglib2.0-dev libcairo2-dev librsvg2-dev libfuse-dev git libcurl4-openssl-dev argagg-dev libgcrypt20-dev && \
wget -qO- https://artifacts.assassinate-you.net/prebuilt-cmake/cmake-v3.22.1-ubuntu_xenial-$ARCH.tar.gz | tar xzv -C/ --strip-components=1
wget -qO- https://artifacts.assassinate-you.net/prebuilt-cmake/cmake-v3.22.1-ubuntu_xenial-$ARCH.tar.gz | tar xzv -C/usr --strip-components=1

COPY libgcrypt.pc /usr/lib/i386-linux-gnu/pkgconfig/libgcrypt.pc
RUN sed -i 's|x86_64|i386|g' /usr/lib/i386-linux-gnu/pkgconfig/libgcrypt.pc
Expand Down
2 changes: 1 addition & 1 deletion ci/Dockerfile.x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apt-get update && \
build-essential libssl-dev autoconf automake libtool \
wget vim-common desktop-file-utils pkgconf \
libglib2.0-dev libcairo2-dev librsvg2-dev libfuse-dev git libcurl4-openssl-dev argagg-dev libgcrypt20-dev && \
wget -qO- https://artifacts.assassinate-you.net/prebuilt-cmake/cmake-v3.22.1-ubuntu_xenial-$ARCH.tar.gz | tar xzv -C/ --strip-components=1
wget -qO- https://artifacts.assassinate-you.net/prebuilt-cmake/cmake-v3.22.1-ubuntu_xenial-$ARCH.tar.gz | tar xzv -C/usr --strip-components=1

COPY libgcrypt.pc /usr/lib/x86_64-linux-gnu/pkgconfig/libgcrypt.pc

Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ add_definitions("-DAPPIMAGEUPDATE_GIT_COMMIT=\"${GIT_COMMIT}\"")
add_definitions("-DBUILD_DATE=\"${DATE}\"")
add_definitions("-DBUILD_NUMBER=\"${BUILD_NUMBER}\"")

add_subdirectory(util)

if(USE_SYSTEM_LIBAPPIMAGE)
set(LIBAPPIMAGE_LINK_TYPE PUBLIC)
else()
Expand All @@ -32,6 +30,8 @@ else()
set(ZSYNC2_LINK_TYPE PRIVATE)
endif()

add_subdirectory(util)

# core library
add_library(libappimageupdate SHARED
${PROJECT_SOURCE_DIR}/include/appimage/update.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace appimage::update::updateinformation {
url << "tags/" << tag;
}

auto response = cpr::Get(url.str());
auto response = cpr::Get(cpr::Url{url.str()});

// counter that will be evaluated later to give some meaningful feedback why parsing API
// response might have failed
Expand Down
2 changes: 1 addition & 1 deletion src/util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ add_library(util STATIC
target_include_directories(util PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
target_link_libraries(util PRIVATE libappimage_shared libzsync2_static)
target_link_libraries(util PRIVATE libappimage_shared ${ZSYNC2_LIBRARY_NAME} cpr)

0 comments on commit a2db215

Please sign in to comment.