diff --git a/cmake/platform.cmake b/cmake/platform.cmake index 7d63c9e..6b31233 100644 --- a/cmake/platform.cmake +++ b/cmake/platform.cmake @@ -97,8 +97,13 @@ endif() # Construct library directory (always EA64) set(IDA_EA_SIZE "64") -set(IDA_LIB_SUFFIX "${IDA_ARCH}_${IDA_PLATFORM_NAME}_${IDA_COMPILER}_64") +# Try without compiler name first (new naming), fall back to with compiler (old naming) +set(IDA_LIB_SUFFIX "${IDA_ARCH}_${IDA_PLATFORM_NAME}_64") set(IDA_LIB_DIR "${IDASDK}/lib/${IDA_LIB_SUFFIX}") +if(NOT EXISTS "${IDA_LIB_DIR}") + set(IDA_LIB_SUFFIX "${IDA_ARCH}_${IDA_PLATFORM_NAME}_${IDA_COMPILER}_64") + set(IDA_LIB_DIR "${IDASDK}/lib/${IDA_LIB_SUFFIX}") +endif() # Platform-specific library names (using consistent platform detection) if(CMAKE_SYSTEM_NAME STREQUAL "Windows") diff --git a/idasdkConfig.cmake b/idasdkConfig.cmake index 7cc5576..be03811 100644 --- a/idasdkConfig.cmake +++ b/idasdkConfig.cmake @@ -50,7 +50,10 @@ if(IDA_UNIVERSAL_BINARY) message(FATAL_ERROR "Unsupported architecture for universal binary: ${_arch}") endif() - set(_lib_dir "${IDASDK}/lib/${_ida_arch}_${IDA_PLATFORM_NAME}_${IDA_COMPILER}_64") + set(_lib_dir "${IDASDK}/lib/${_ida_arch}_${IDA_PLATFORM_NAME}_64") + if(NOT EXISTS "${_lib_dir}") + set(_lib_dir "${IDASDK}/lib/${_ida_arch}_${IDA_PLATFORM_NAME}_${IDA_COMPILER}_64") + endif() set(_lib_path "${_lib_dir}/lib${_lib_basename}.dylib") if(NOT EXISTS "${_lib_path}")