diff --git a/source/common/CMakeLists.txt b/source/common/CMakeLists.txt index f240f9908b..5c6fb231da 100644 --- a/source/common/CMakeLists.txt +++ b/source/common/CMakeLists.txt @@ -3,28 +3,25 @@ # See LICENSE.TXT # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -add_library(ur_common INTERFACE) +add_subdirectory(unified_malloc_framework) +add_subdirectory(umf_pools) + +add_ur_library(ur_common STATIC + umf_helpers.hpp + ur_pool_manager.hpp + $<$:windows/ur_lib_loader.cpp> + $<$:linux/ur_lib_loader.cpp> +) add_library(${PROJECT_NAME}::common ALIAS ur_common) -target_include_directories(ur_common INTERFACE +target_include_directories(ur_common PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/include ) -add_subdirectory(unified_malloc_framework) -add_subdirectory(umf_pools) -target_link_libraries(ur_common INTERFACE unified_malloc_framework disjoint_pool ${CMAKE_DL_LIBS} ${PROJECT_NAME}::headers) - -if(WIN32) - target_sources(ur_common - INTERFACE - ${CMAKE_CURRENT_SOURCE_DIR}/windows/ur_lib_loader.cpp - umf_helpers.hpp ur_pool_manager.hpp - ) -else() - target_sources(ur_common - INTERFACE - ${CMAKE_CURRENT_SOURCE_DIR}/linux/ur_lib_loader.cpp - umf_helpers.hpp ur_pool_manager.hpp - ) -endif() +target_link_libraries(ur_common PUBLIC + unified_malloc_framework + disjoint_pool + ${CMAKE_DL_LIBS} + ${PROJECT_NAME}::headers +) diff --git a/test/loader/loader_config/CMakeLists.txt b/test/loader/loader_config/CMakeLists.txt index b2c2ffc4ec..db07bec990 100644 --- a/test/loader/loader_config/CMakeLists.txt +++ b/test/loader/loader_config/CMakeLists.txt @@ -3,7 +3,7 @@ # See LICENSE.TXT # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -add_executable(test-loader-config +add_ur_executable(test-loader-config urLoaderConfigCreate.cpp urLoaderConfigGetInfo.cpp urLoaderConfigEnableLayer.cpp