Skip to content
Permalink
Browse files

Update finding QCA OSSL plugin for Qt5 and C++11

  • Loading branch information
dakcarto committed Nov 20, 2016
1 parent 74dfd1f commit 9bb32357c7d0e3c43e3be07158c2bed5bbfed370
Showing with 5 additions and 4 deletions.
  1. +5 −4 cmake/QCAMacros.cmake
@@ -13,7 +13,7 @@
function(FIND_QCAOSSL_PLUGIN_CPP PLUGIN_REQUIRED)

# requires Qt and QCA packages to be found
if(QT_INCLUDE_DIR AND QT_QTCORE_INCLUDE_DIR AND QT_QTCORE_LIBRARY
if(QT_INCLUDES AND Qt5Core_LIBRARIES
AND QCA_INCLUDE_DIR AND QCA_LIBRARY
AND NOT CMAKE_CROSSCOMPILING)

@@ -38,12 +38,13 @@ function(FIND_QCAOSSL_PLUGIN_CPP PLUGIN_REQUIRED)
set(TESTCPP "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/qcaossl.cpp")
file(WRITE ${TESTCPP} "${CODE}")

set(QCA_INCLUDE_DIRECTORIES "-DINCLUDE_DIRECTORIES:STRING=${QT_INCLUDE_DIR};${QT_QTCORE_INCLUDE_DIR};${QCA_INCLUDE_DIR}")
set(QCA_LINK_LIBRARIES "-DLINK_LIBRARIES:STRING=${QT_QTCORE_LIBRARY};${QCA_LIBRARY}")
set(QCA_INCLUDE_DIRECTORIES "-DINCLUDE_DIRECTORIES:STRING=${QT_INCLUDES};${QCA_INCLUDE_DIR}")
get_target_property(_QtCore_path Qt5::Core LOCATION)
set(QCA_LINK_LIBRARIES "-DLINK_LIBRARIES:STRING=${_QtCore_path};${QCA_LIBRARY}")

try_run(RUN_RESULT COMPILE_RESULT
${CMAKE_BINARY_DIR} ${TESTCPP}
CMAKE_FLAGS "${QCA_INCLUDE_DIRECTORIES}" "${QCA_LINK_LIBRARIES}"
CMAKE_FLAGS "-DCMAKE_CXX_STANDARD=11" "${QCA_INCLUDE_DIRECTORIES}" "${QCA_LINK_LIBRARIES}"
COMPILE_OUTPUT_VARIABLE COMPILE_OUTPUT
)

0 comments on commit 9bb3235

Please sign in to comment.
You can’t perform that action at this time.