diff --git a/CMakeLists.txt b/CMakeLists.txt index 7238cd14a1..3dcb3731c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,6 +86,9 @@ else () endif () endif () +# figure out where the qt dir is +get_filename_component(QT_DIR "${QT_CMAKE_PREFIX_PATH}/../../" ABSOLUTE) + set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${QT_CMAKE_PREFIX_PATH}) # set our OS X deployment target to @@ -127,7 +130,7 @@ if (ANDROID) endif () if (WIN32) - add_paths_to_lib_paths("${QT_CMAKE_PREFIX_PATH}\\..\\..\\bin") + add_paths_to_lib_paths("${QT_DIR}/bin") endif () # add subdirectories for all targets diff --git a/cmake/android/QtCreateAPK.cmake b/cmake/android/QtCreateAPK.cmake index a8543a5fbc..c3a4a48ac7 100644 --- a/cmake/android/QtCreateAPK.cmake +++ b/cmake/android/QtCreateAPK.cmake @@ -39,9 +39,6 @@ macro(qt_create_apk) # create "strings.xml" configure_file("${ANDROID_THIS_DIRECTORY}/strings.xml.in" "${ANDROID_APK_BUILD_DIR}/res/values/strings.xml") - - # figure out where the qt dir is - get_filename_component(QT_DIR "${QT_CMAKE_PREFIX_PATH}/../../" ABSOLUTE) # find androiddeployqt find_program(ANDROID_DEPLOY_QT androiddeployqt HINTS "${QT_DIR}/bin")