diff --git a/CMakeLists.txt b/CMakeLists.txt index 265ef7c..b9d3e6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() @@ -56,7 +58,7 @@ 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 @@ -64,7 +66,7 @@ ExternalProject_add(project_srt 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) @@ -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}) - diff --git a/NEWS.rst b/NEWS.rst index fda56cf..f30e27d 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -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 ----- diff --git a/cmake/zig-ar.sh b/cmake/zig-ar.sh new file mode 100755 index 0000000..3d69448 --- /dev/null +++ b/cmake/zig-ar.sh @@ -0,0 +1,2 @@ +#!/bin/sh +zig ar "$@" diff --git a/cmake/zig-ranlib.sh b/cmake/zig-ranlib.sh new file mode 100755 index 0000000..e35d99a --- /dev/null +++ b/cmake/zig-ranlib.sh @@ -0,0 +1,3 @@ +#!/bin/sh +zig ranlib "$@" + diff --git a/cmake/zig.cmake b/cmake/zig.cmake new file mode 100644 index 0000000..3c89808 --- /dev/null +++ b/cmake/zig.cmake @@ -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")