Skip to content

Commit

Permalink
chore(build): Rename binary
Browse files Browse the repository at this point in the history
Signed-off-by: txtsd <code@ihavea.quest>
  • Loading branch information
txtsd committed Mar 20, 2024
1 parent 8c8f122 commit 66d69d7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ runuser -u abuilder -- /bin/sed -i "s/--disable-static/--enable-static/" APKBUIL
runuser -u abuilder -- /usr/bin/abuild -r
apk add /home/abuilder/packages/main/$(abuild -A)/libnl3*

# Build static DPITunnel-cli
# Build static DPITunnel
cd ${cwd}
cmake -B build -DCMAKE_BUILD_TYPE=RELEASE -DSTATIC_BINARY=true -G Ninja .
cmake --build build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: dpitunnel-${{ matrix.arch }}
path: build/DPITunnel-exec
path: build/dpitunnel

- name: Upload Binary to Release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@2.9.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/DPITunnel-exec
file: build/dpitunnel
asset_name: dpitunnel-${{ matrix.arch }}
tag: ${{ github.ref }}
16 changes: 8 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ add_subdirectory(RawSocket)
add_subdirectory(dnslib)

# Add an executable
add_executable(DPITunnel-exec
add_executable(dpitunnel
autoconf.cpp
desync.cpp
dns.cpp
Expand All @@ -63,10 +63,10 @@ add_executable(DPITunnel-exec
)

if (STATIC_BINARY)
target_link_libraries(DPITunnel-exec -static)
target_link_options(DPITunnel-exec PRIVATE "LINKER:--gc-sections")
target_link_options(DPITunnel-exec PRIVATE "LINKER:-s")
target_compile_options(DPITunnel-exec PRIVATE -ffunction-sections)
target_link_libraries(dpitunnel -static)
target_link_options(dpitunnel PRIVATE "LINKER:--gc-sections")
target_link_options(dpitunnel PRIVATE "LINKER:-s")
target_compile_options(dpitunnel PRIVATE -ffunction-sections)
endif ()

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
Expand All @@ -90,15 +90,15 @@ endif ()
find_package(LibNL REQUIRED)

# Set the directories that should be included in the build command for this target
target_include_directories(DPITunnel-exec
target_include_directories(dpitunnel
PRIVATE
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/RawSocket/include
${PROJECT_SOURCE_DIR}/dnslib/include
${LibNL_INCLUDE_DIR}
)

target_link_libraries(DPITunnel-exec
target_link_libraries(dpitunnel
RawSocket
httplib::httplib
dnslib
Expand All @@ -110,5 +110,5 @@ target_link_libraries(DPITunnel-exec
)

if (STATIC_BINARY)
target_link_libraries(DPITunnel-exec ${CMAKE_DL_LIBS})
target_link_libraries(dpitunnel ${CMAKE_DL_LIBS})
endif ()

0 comments on commit 66d69d7

Please sign in to comment.