Skip to content

Commit

Permalink
CMake files updated.
Browse files Browse the repository at this point in the history
Fixed QCA find module. Fixed missing QCA_STATIC definition
  • Loading branch information
Vitozz committed Mar 18, 2024
1 parent 76fd7c5 commit 264634d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ foreach(submodule ${SBM_LIST})
endforeach()

set( DEFAULT_BUNDLED_QCA OFF )
if (APPLE OR MSVC)
if (APPLE OR ((MSVC OR USE_MXE) OR BUNDLED_IRIS_ALL))
set( DEFAULT_BUNDLED_QCA ON )
endif()

set( DEFAULT_BUNDLED_USRSCTP OFF )
if (APPLE OR (MSVC OR USE_MXE))
if (APPLE OR ((MSVC OR USE_MXE) OR BUNDLED_IRIS_ALL))
set( DEFAULT_BUNDLED_USRSCTP ON )
endif()

Expand Down Expand Up @@ -176,10 +176,6 @@ if(USE_CRASH)
add_definitions(-DUSE_CRASH)
endif()

if(IRIS_BUNDLED_QCA)
add_definitions(-DQCA_STATIC)
endif()

# Detect MXE cross-compilation
if(EXISTS "${CMAKE_TOOLCHAIN_FILE}")
string(TOLOWER ${CMAKE_TOOLCHAIN_FILE} TOOLCHAIN_FILE)
Expand Down Expand Up @@ -289,6 +285,10 @@ if (BUNDLED_IRIS_ALL)
set(IRIS_BUNDLED_USRSCTP ON)
endif()

if(IRIS_BUNDLED_QCA)
add_definitions(-DQCA_STATIC)
endif()

# Copy a list of files from one directory to another. Only full paths.
function(copy SOURCE DEST TARGET)
if(EXISTS ${SOURCE})
Expand Down
14 changes: 7 additions & 7 deletions cmake/modules/FindQca.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#=============================================================================
# Copyright 2016-2017 Psi+ Project, Vitaly Tonkacheyev
# Copyright 2016-2020 Psi+ Project, Vitaly Tonkacheyev
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -34,11 +34,11 @@ if (Qca_INCLUDE_DIR AND Qca_LIBRARY)
endif()

set(EXTRA_PATH_SUFFIXES
qt5/Qca-qt5/QtCrypto
Qca-qt5/QtCrypto
qt5/QtCrypto
qt/Qca-qt5/QtCrypto
lib/qca-qt5.framework/Versions/2/Headers
qt${QT_DEFAULT_MAJOR_VERSION}/Qca-qt${QT_DEFAULT_MAJOR_VERSION}/QtCrypto
Qca-qt${QT_DEFAULT_MAJOR_VERSION}/QtCrypto
qt${QT_DEFAULT_MAJOR_VERSION}/QtCrypto
qt/Qca-qt${QT_DEFAULT_MAJOR_VERSION}/QtCrypto
lib/qca-qt${QT_DEFAULT_MAJOR_VERSION}.framework/Versions/2/Headers
)

find_path(
Expand All @@ -52,7 +52,7 @@ find_path(

find_library(
Qca_LIBRARY
NAMES qca-qt5${D}
NAMES qca-qt${QT_DEFAULT_MAJOR_VERSION}${D}
HINTS
${QCA_DIR}/lib
${QCA_DIR}/bin
Expand Down

0 comments on commit 264634d

Please sign in to comment.