-
Notifications
You must be signed in to change notification settings - Fork 33
Fix libappimage_static #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ add_subdirectory(utils) | |
|
||
set( | ||
libappimage_sources | ||
libappimage.c | ||
libappimage.cpp | ||
$<TARGET_OBJECTS:core> | ||
$<TARGET_OBJECTS:appimage_utils> | ||
|
@@ -23,7 +22,6 @@ foreach(target libappimage libappimage_static) | |
target_link_libraries( | ||
${target} | ||
PRIVATE libarchive | ||
PRIVATE xdg-basedir | ||
PRIVATE XdgUtils::DesktopEntry | ||
PRIVATE XdgUtils::BaseDir | ||
PRIVATE libappimage_hashlib | ||
|
@@ -44,24 +42,22 @@ foreach(target libappimage libappimage_static) | |
target_link_libraries(${target} PRIVATE -static-libgcc -static-libstdc++) | ||
endif() | ||
|
||
target_include_directories(${target} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>) | ||
set_property(TARGET ${target} PROPERTY PUBLIC_HEADER ${libappimage_public_header}) | ||
|
||
set_property(TARGET libappimage PROPERTY PUBLIC_HEADER ${libappimage_public_header}) | ||
set_property(TARGET ${target} PROPERTY VERSION ${libappimage_VERSION}) | ||
set_property(TARGET ${target} PROPERTY SOVERSION ${libappimage_SOVERSION}) | ||
|
||
set_property(TARGET libappimage PROPERTY VERSION ${libappimage_VERSION}) | ||
set_property(TARGET libappimage PROPERTY SOVERSION ${libappimage_SOVERSION}) | ||
# install libappimage | ||
install( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I somewhere read that using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are right, using |
||
TARGETS ${target} | ||
EXPORT libappimageTargets | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libappimage | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libappimage | ||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/appimage COMPONENT libappimage-dev | ||
) | ||
endforeach() | ||
|
||
|
||
# install libappimage | ||
install( | ||
TARGETS libappimage | ||
EXPORT libappimageTargets | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libappimage | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libappimage | ||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/appimage COMPONENT libappimage-dev | ||
) | ||
|
||
# install public headers | ||
install( | ||
DIRECTORY ${PROJECT_SOURCE_DIR}/include/appimage/ | ||
|
@@ -71,6 +67,6 @@ install( | |
|
||
# Add all targets to the build-tree export set | ||
export( | ||
TARGETS libappimage libappimage_shared libappimage_hashlib | ||
TARGETS libappimage libappimage_static libappimage_shared libappimage_hashlib | ||
FILE "${PROJECT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/libappimageTargets.cmake" | ||
) |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
project(client_app) | ||
cmake_minimum_required(VERSION 3.0) | ||
|
||
find_package(libappimage REQUIRED) | ||
|
||
add_executable(client_app main.c) | ||
target_link_libraries(client_app libappimage) | ||
|
||
add_executable(client_app_static_linked main.c) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The "test" here is to check if linking works? You should document that somewhere, e.g., above this line. |
||
target_link_libraries(client_app_static_linked libappimage_static) |
Uh oh!
There was an error while loading. Please reload this page.