From 2d8a4685857c768da7ad1d8a7c6e07b1b5285cca Mon Sep 17 00:00:00 2001 From: Salman Javed <89359699+salman-javed-nz@users.noreply.github.com> Date: Wed, 17 Jan 2024 20:44:45 +1300 Subject: [PATCH] Fix setting of ARCH_INDEPENDENT based on INTERFACE_LIBRARY property (#39) If PROJECT_ARCH_INDEPENDENT is not set by the user, PackageProject will attempt to set this automatically depending on whether the target is an INTERFACE_LIBRARY or not. However, this auto-detection currently does not work due to an error in the CMake logic. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ab3fd8..2c35c56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,7 +108,7 @@ function(packageProject) set(wbpvf_extra_args "") if(NOT DEFINED PROJECT_ARCH_INDEPENDENT) get_target_property(target_type "${PROJECT_NAME}" TYPE) - if(TYPE STREQUAL "INTERFACE_LIBRARY") + if(target_type STREQUAL "INTERFACE_LIBRARY") set(PROJECT_ARCH_INDEPENDENT YES) endif() endif()