Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-roos committed Dec 19, 2024
1 parent 7c199cb commit cd762b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 31 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/static-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
uses: actions/cache@v4
with:
path: |
~/.local/share/containers
!~/.local/share/containers/storage/overlay
../../../.local/share/containers/
key: ${{ runner.os }}-${{ matrix.architecture }}-podman-${{ hashFiles('misc/staticbuildtestcontainer/*') }}
restore-keys: |
${{ runner.os }}-${{ matrix.architecture }}-podman-
Expand All @@ -34,7 +33,7 @@ jobs:
shell: bash
run: |
# this will link static if no shared alternative lib is available
podman run -v $PWD/.:/aws-greengrass-lite --replace --name ggl container:latest bash -c "\
podman run --userns=keep-id -v $PWD/.:/aws-greengrass-lite --replace --name ggl container:latest bash -c "\
cd /aws-greengrass-lite && \
rm -rf build/ && \
cmake -B build \
Expand Down
28 changes: 0 additions & 28 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ set(GGL_SYSTEMD_SYSTEM_GROUP
"ggcore"
CACHE STRING "Core service group")

option(STATIC_LINK_CORE_LIBS
"Statically link core libraries (OpenSSL, libcurl)" OFF)

#
# Misc
#
Expand Down Expand Up @@ -283,29 +280,6 @@ check_c_source_compiles(
# Add components
#

# Setup static linking for target
function(setup_static_linking target)
if(STATIC_LINK_CORE_LIBS)
target_link_libraries(
${target}
PRIVATE $<LINK_ONLY:${openssl_STATIC_LIBRARIES}>
$<LINK_ONLY:${libcurl_STATIC_LIBRARIES}>
$<LINK_ONLY:${sqlite3_STATIC_LIBRARIES}>)
target_include_directories(
${target}
PRIVATE ${openssl_STATIC_INCLUDE_DIRS} ${libcurl_STATIC_INCLUDE_DIRS}
${sqlite3_STATIC_INCLUDE_DIRS})
target_compile_options(
${target}
PRIVATE ${openssl_STATIC_CFLAGS_OTHER} ${libcurl_STATIC_CFLAGS_OTHER}
${sqlite3_STATIC_CFLAGS_OTHER})
else()
target_link_libraries(
${target} PRIVATE PkgConfig::openssl PkgConfig::libcurl
PkgConfig::sqlite3)
endif()
endfunction()

# Common setup for a GGL module
function(ggl_init_module name)
# TODO: special-case the socket permissions and directory for ggipcd
Expand Down Expand Up @@ -343,7 +317,6 @@ function(ggl_init_module name)
target_include_directories(${name} PRIVATE ${COMP_ARG_INCDIRS})
target_include_directories(${name} SYSTEM INTERFACE ${COMP_ARG_INCDIRS})
target_link_libraries(${name} PRIVATE ${COMP_ARG_LIBS})
setup_static_linking(${name})
endif()

if(GGL_SYSTEMD_SERVICE_BUILD)
Expand All @@ -370,7 +343,6 @@ function(ggl_init_module name)
target_link_libraries(${bin_name}-bin PRIVATE ${name})
endif()
target_link_libraries(${bin_name}-bin PRIVATE ${COMP_ARG_LIBS})
setup_static_linking(${bin_name}-bin)
if(NOT has_argp)
target_link_libraries(${bin_name}-bin PRIVATE argp)
endif()
Expand Down

0 comments on commit cd762b4

Please sign in to comment.