From b40903fbc999bbbe016569b4b60e60f1309ed324 Mon Sep 17 00:00:00 2001 From: Jesse Qu Date: Mon, 22 Jul 2024 17:39:30 +0800 Subject: [PATCH] modified CMakeLists.txt --- CMakeLists.txt | 1 + QtADS/CMakeLists.txt | 15 +++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b93f4ec..f90f38a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,4 +2,5 @@ cmake_minimum_required(VERSION 3.5) project(PowerDesigner LANGUAGES CXX VERSION 1.0) +set(ADS_VERSION 4.3.1) add_subdirectory(QtADS) diff --git a/QtADS/CMakeLists.txt b/QtADS/CMakeLists.txt index 569876c..6985490 100644 --- a/QtADS/CMakeLists.txt +++ b/QtADS/CMakeLists.txt @@ -26,9 +26,6 @@ else() endif() endif() -set(ADS_VERSION 4.3.1) -set(VERSION_SHORT 4.3.1) - project(QtADS LANGUAGES CXX VERSION ${VERSION_SHORT}) option(BUILD_STATIC "Build the static library" OFF) @@ -37,7 +34,17 @@ option(BUILD_EXAMPLES "Build the examples" ON) if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "4") set(ads_PlatformDir "x86") else() - set(ads_PlatformDir "x64") + if(DEFINED CMAKE_SYSTEM_PROCESSOR) + if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64") + set(ads_PlatformDir "x64") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64") + set(ads_PlatformDir "aarch64") + else() + set(ads_PlatformDir "x64") + endif() + else() + set(ads_PlatformDir "x64") + endif() endif() add_subdirectory(src)