diff --git a/.github/workflows/dls-build-and-test-windows.yaml b/.github/workflows/dls-build-and-test-windows.yaml index e6ccae20..b4f7ee03 100644 --- a/.github/workflows/dls-build-and-test-windows.yaml +++ b/.github/workflows/dls-build-and-test-windows.yaml @@ -68,7 +68,7 @@ jobs: shell: powershell run: | $target = "${{ env.DLS_TARGET_DIRECTORY }}" - $source = "C:\dlstreamer_tmp\build\intel64\Release\bin\Release" + $source = "C:\dlstreamer_tmp\build\intel64\Release\bin" Write-Host "`nContents of source directory ($source):" Get-ChildItem -Path $source -Recurse if (Test-Path $target) { diff --git a/CMakeLists.txt b/CMakeLists.txt index 3eeb4558..31072495 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ # ============================================================================== -# Copyright (C) 2018-2025 Intel Corporation +# Copyright (C) 2018-2026 Intel Corporation # # SPDX-License-Identifier: MIT # ============================================================================== @@ -76,11 +76,21 @@ if (NOT(BIN_FOLDER)) endif() endif() -set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE}/lib) -set (CMAKE_PLUGIN_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE}/lib/gstreamer-1.0) -set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE}/lib) -set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE}/bin) -set (CMAKE_SAMPLES_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE}/samples) +# Use generator expression for build type +set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/$/lib) +set (CMAKE_PLUGIN_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/$/lib/gstreamer-1.0) +set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/$/lib) +set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/$/bin) +set (CMAKE_SAMPLES_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/$/samples) + +# For multi-config generators (Visual Studio), set per-configuration output directories to prevent appending an additional config subdirectory. +# For single-config generators (Makefiles), CMAKE_CONFIGURATION_TYPES is empty, so this loop is skipped. +foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES}) + string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG_UPPER) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG_UPPER} ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/${OUTPUTCONFIG}/lib) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG_UPPER} ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/${OUTPUTCONFIG}/lib) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG_UPPER} ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/${OUTPUTCONFIG}/bin) +endforeach() set (DLSTREAMER_LIBRARIES_INSTALL_PATH lib) set (DLSTREAMER_PLUGINS_INSTALL_PATH ${DLSTREAMER_LIBRARIES_INSTALL_PATH}/gstreamer-1.0) diff --git a/include/dlstreamer/gst/videoanalytics/CMakeLists.txt b/include/dlstreamer/gst/videoanalytics/CMakeLists.txt index 838a9353..42887b0d 100644 --- a/include/dlstreamer/gst/videoanalytics/CMakeLists.txt +++ b/include/dlstreamer/gst/videoanalytics/CMakeLists.txt @@ -1,5 +1,5 @@ # ============================================================================== -# Copyright (C) 2018-2024 Intel Corporation +# Copyright (C) 2018-2026 Intel Corporation # # SPDX-License-Identifier: MIT # ============================================================================== @@ -52,6 +52,5 @@ if(${ENABLE_AUDIO_INFERENCE_ELEMENTS}) target_link_libraries(${TARGET_NAME} INTERFACE ${GSTAUDIO_LIBRARIES}) endif() -configure_file(${CMAKE_SOURCE_DIR}/cmake/dl-streamer.pc.in ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pkgconfig/dl-streamer.pc @ONLY) - -install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pkgconfig/dl-streamer.pc DESTINATION ${DLSTREAMER_LIBRARIES_INSTALL_PATH}/pkgconfig/) \ No newline at end of file +configure_file(${CMAKE_SOURCE_DIR}/cmake/dl-streamer.pc.in ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE}/lib/pkgconfig/dl-streamer.pc @ONLY) +install(FILES ${CMAKE_BINARY_DIR}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE}/lib/pkgconfig/dl-streamer.pc DESTINATION ${DLSTREAMER_LIBRARIES_INSTALL_PATH}/pkgconfig/)