Skip to content

Commit

Permalink
Fix no artifacts in resolve_symlinks (#5)
Browse files Browse the repository at this point in the history
* Patch: Fix cmake build, such that no artifacts are in resolve_symlinks
  • Loading branch information
loglund authored Oct 8, 2024
1 parent 8c4302e commit 8f4f6f8
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ if(NOT DEFINED STEINWURF_RESOLVE)
set(STEINWURF_TOP_NAME ${PROJECT_NAME})
endif()


if (DEFINED CMAKE_TOOLCHAIN_FILE)
set(TOOLCHAIN_OPTION "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
endif()



Expand Down Expand Up @@ -56,15 +58,15 @@ ExternalProject_add(project_srt
SOURCE_DIR ${STEINWURF_RESOLVE}/srt-source
BINARY_DIR ${STEINWURF_RESOLVE}/srt-source/cmake_build
INSTALL_DIR ${STEINWURF_RESOLVE}/srt-source/install
CONFIGURE_COMMAND ${CMAKE_COMMAND} ${STEINWURF_RESOLVE}/srt-source/ -DENABLE_BONDING=ON -DENABLE_APPS=OFF -DENABLE_ENCRYPTION=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DENABLE_SHARED=ON -DENABLE_STATIC=ON -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DENABLE_DEBUG=${SRT_ENABLE_DEBUG}
CONFIGURE_COMMAND ${CMAKE_COMMAND} ${STEINWURF_RESOLVE}/srt-source/ ${TOOLCHAIN_OPTION} -DENABLE_BONDING=ON -DENABLE_APPS=OFF -DENABLE_ENCRYPTION=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DENABLE_SHARED=ON -DENABLE_STATIC=ON -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DENABLE_DEBUG=${SRT_ENABLE_DEBUG}
BUILD_COMMAND ${CMAKE_COMMAND} --build ${STEINWURF_RESOLVE}/srt-source/cmake_build --config ${CMAKE_BUILD_TYPE}
EXCLUDE_FROM_ALL TRUE
STEP_TARGETS build
INSTALL_COMMAND ${CMAKE_COMMAND} --install ${STEINWURF_RESOLVE}/srt-source/cmake_build --prefix ${STEINWURF_RESOLVE}/srt-source/install --config ${CMAKE_BUILD_TYPE}
BUILD_BYPRODUCTS ${STEINWURF_RESOLVE}/srt-source/install/${CMAKE_INSTALL_LIBDIR}/${LIB_NAME}
)

message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
# message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
add_library(srt STATIC IMPORTED GLOBAL)
add_dependencies(srt project_srt)
add_library(steinwurf::srt ALIAS srt)
Expand All @@ -78,8 +80,6 @@ set_target_properties(srt PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${SRT_GENERATED_INCLUDE_DIR}
)

target_include_directories(srt INTERFACE ${SRT_GENERATED_INCLUDE_DIR})




Expand Down
2 changes: 1 addition & 1 deletion NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ every change, see the Git log..

Latest
------
* tbd
* Patch: Fix cmake build, such that no artifacts are in resolve_symlinks

2.2.0
-----
Expand Down
2 changes: 2 additions & 0 deletions cmake/zig-ar.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
zig ar "$@"
3 changes: 3 additions & 0 deletions cmake/zig-ranlib.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
zig ranlib "$@"

6 changes: 6 additions & 0 deletions cmake/zig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@


set(CMAKE_C_COMPILER "zig" cc -target ${ZIG_TARGET})
set(CMAKE_CXX_COMPILER "zig" c++ -target ${ZIG_TARGET})
set(CMAKE_AR "${CMAKE_CURRENT_LIST_DIR}/zig-ar.sh")
set(CMAKE_RANLIB "${CMAKE_CURRENT_LIST_DIR}/zig-ranlib.sh")

0 comments on commit 8f4f6f8

Please sign in to comment.