Skip to content

Commit 3baac9d

Browse files
committed
More CMake tweaks
1 parent d31a533 commit 3baac9d

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ add_executable(wsddn)
6565

6666
set_target_properties(argum PROPERTIES FOLDER "Dependencies")
6767
set_target_properties(sys_string PROPERTIES FOLDER "Dependencies")
68+
if (TARGET generate_unicode_mappings)
69+
set_target_properties(generate_unicode_mappings PROPERTIES FOLDER "Dependencies")
70+
endif()
6871
set_target_properties(isptr PROPERTIES FOLDER "Dependencies")
6972
set_target_properties(ptl PROPERTIES FOLDER "Dependencies")
7073
if (TARGET LibXml2)

cmake/dependencies.cmake

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ function(fetch_dependency name #extras for FetchContent_Declare
4040
list(APPEND extras ${ARGV${i}})
4141
endforeach()
4242

43-
if (CACHE{LAST_WSDDN_PREFER_SYSTEM_${uname}})
43+
if ($CACHE{LAST_WSDDN_PREFER_SYSTEM_${uname}})
4444
set(old_prefer 1)
4545
else()
4646
set(old_prefer 0)
4747
endif()
48-
48+
4949
if (WSDDN_PREFER_SYSTEM_${uname})
5050
set(new_prefer 1)
5151
else()
@@ -57,11 +57,18 @@ function(fetch_dependency name #extras for FetchContent_Declare
5757
unset(${lname}_SOURCE_DIR CACHE)
5858
unset(${lname}_BINARY_DIR CACHE)
5959
unset(${name}_FOUND CACHE)
60+
if (DEFINED ${lname}_DIR AND "${${lname}_DIR}" STREQUAL "${CMAKE_FIND_PACKAGE_REDIRECTS_DIR}")
61+
unset(${lname}_DIR CACHE)
62+
endif()
6063
endif()
6164
set(LAST_WSDDN_PREFER_SYSTEM_${uname} ${WSDDN_PREFER_SYSTEM_${uname}} CACHE INTERNAL "")
6265

6366
if (WSDDN_PREFER_SYSTEM_${uname})
64-
set(prefer_system FIND_PACKAGE_ARGS)
67+
# string(JSON find_args ERROR_VARIABLE find_args_err GET "${DEPENDECIES_JSON}" ${name} find_args)
68+
# if (find_args_err)
69+
# unset(find_args)
70+
# endif()
71+
set(prefer_system FIND_PACKAGE_ARGS ${find_args})
6572
else()
6673
set(prefer_system "")
6774
endif()

0 commit comments

Comments
 (0)