cmake: fix buidling using rocksdb built as RelWithDebInfo #9359

See logs below for example issue I've met locally when I had just `RocksDBTargets-relwithdebinfo.cmake`.
Providing a list of configs makes it try to use matching config first and only then try `Release` as a fallback, otherwise it was now requiring `Release` builds.

```
CMake Error in CMakeLists.txt:
  IMPORTED_LOCATION not set for imported target "RocksDB::rocksdb"
  configuration "RelWithDebInfo".
```
This commit is contained in:
Andrej730
2026-08-27 11:25:40 +05:00
parent 5903c3c895
commit d2da2988a4
+2 -2
View File
@@ -331,8 +331,8 @@ if (WITH_ROCKSDB)
# /MDd-flavored rocksdb_d.lib into an /MD (NDEBUG) binary, causing a CRT/runtime-library
# mismatch that depends on nothing but that alphabetical ordering.
set_target_properties(${IFCOPENSHELL_ROCKSDB_IMPORTED_TARGET} PROPERTIES
MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE
MAP_IMPORTED_CONFIG_MINSIZEREL RELEASE
MAP_IMPORTED_CONFIG_RELWITHDEBINFO "RELWITHDEBINFO;RELEASE"
MAP_IMPORTED_CONFIG_MINSIZEREL "MINSIZEREL;RELEASE"
)
target_link_libraries(IFCOPENSHELL_RocksDB INTERFACE ${IFCOPENSHELL_ROCKSDB_IMPORTED_TARGET})