2 cmake_minimum_required(VERSION 3.5)
4 set(APPIMAGE_MAJOR_VERSION 0)
5 set(APPIMAGE_MINOR_VERSION 1)
6 set(APPIMAGE_PATCH_VERSION 0)
8 ${APPIMAGE_MAJOR_VERSION}.${APPIMAGE_MINOR_VERSION}.${APPIMAGE_PATCH_VERSION})
10 SET (STATIC_BUILD NO CACHE PATH "Link against static libs.")
12 include(cmake/ImportedTargets.cmake)
16 # Looking for dependencies
18 find_package(PkgConfig)
21 COMMAND git describe --tags --always --abbrev=7
22 OUTPUT_VARIABLE VERSION_NUMBER
24 string(STRIP ${VERSION_NUMBER} VERSION_NUMBER)
26 pkg_check_modules(GLIB REQUIRED glib-2.0)
27 include_directories(${GLIB_INCLUDE_DIRS})
29 pkg_check_modules(GIO REQUIRED gio-2.0)
30 include_directories(${GIO_INCLUDE_DIRS})
33 pkg_check_modules(CAIRO REQUIRED cairo)
34 include_directories(${CAIRO_INCLUDE_DIRS})
39 include_directories("../squashfuse/")
40 include_directories("../libarchive-3.3.1/libarchive")
54 add_library(appimage ${LIBAPPIMAGE_SRC})
55 target_compile_definitions(appimage
56 PRIVATE _FILE_OFFSET_BITS=64
57 PRIVATE HAVE_LIBARCHIVE3=0
58 PRIVATE VERSION_NUMBER="${VERSION_NUMBER}"
60 set_target_properties(appimage PROPERTIES VERSION ${VERSION_NUMBER})
61 set_target_properties(appimage PROPERTIES PUBLIC_HEADER ./libappimage.h)
63 target_link_libraries(appimage
80 include(cmake/ConfigureDeploy.cmake)
83 add_subdirectory(test)