Skip to content

Commit

Permalink
Update finding QCA OSSL plugin for Qt5 and C++11
Browse files Browse the repository at this point in the history
  • Loading branch information
dakcarto committed Nov 20, 2016
1 parent 74dfd1f commit 9bb3235
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cmake/QCAMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
)

Expand Down

0 comments on commit 9bb3235

Please sign in to comment.