File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -100,10 +100,12 @@ if(NOT MbedTLS_FOUND)
100100 set_property (TARGET mbedcrypto PROPERTY POSITION_INDEPENDENT_CODE ON )
101101 set_property (TARGET mbedx509 PROPERTY POSITION_INDEPENDENT_CODE ON )
102102
103- # Aliases for compatibility with find_package
104- add_library (MbedTLS::mbedtls ALIAS mbedtls)
105- add_library (MbedTLS::mbedcrypto ALIAS mbedcrypto)
106- add_library (MbedTLS::mbedx509 ALIAS mbedx509)
103+ if (CMAKE_VERSION VERSION_LESS 3.18)
104+ # Aliases for compatibility with find_package, newer cmake versions add these already
105+ add_library (MbedTLS::mbedtls ALIAS mbedtls)
106+ add_library (MbedTLS::mbedcrypto ALIAS mbedcrypto)
107+ add_library (MbedTLS::mbedx509 ALIAS mbedx509)
108+ endif ()
107109endif ()
108110
109111if (NOT nlohmann_json_FOUND)
You can’t perform that action at this time.
0 commit comments