File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -81,15 +81,13 @@ pkg_check_modules(libgio REQUIRED gio-2.0 IMPORTED_TARGET)
8181pkg_check_modules(libcurl REQUIRED libcurl IMPORTED_TARGET)
8282
8383# Alpine Linux does not ship an argp.h as part of the standard compiler toolchain
84- unset (ARGP_H_FOUND CACHE )
85- include (CheckCSourceCompiles)
86- check_c_source_compiles("
87- #include <argp.h>
88- int main() { return 0; }
89- " ARGP_H_FOUND)
84+ # Non-Linux OSes like FreeBSD do not have this header too
85+ find_file (ARGP_H argp.h HINTS /usr/include /usr/local/include )
9086
91- if (NOT ARGP_H_FOUND )
87+ if (NOT ARGP_H )
9288 message (FATAL_ERROR "argp.h not installed, if on Alpine Linux please apk add argp-standalone" )
9389endif ()
9490
91+ get_filename_component (ARGP_INCLUDE_DIR "${ARGP_H} " DIRECTORY )
92+
9593add_subdirectory (src)
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ target_compile_definitions(appimagetool
2828
2929target_include_directories (appimagetool
3030 PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR} /include />
31+ $<BUILD_INTERFACE:${ARGP_INCLUDE_DIR} >
3132 INTERFACE $<INSTALL_INTERFACE:include />
3233)
3334
You can’t perform that action at this time.
0 commit comments