forked from qt-creator/qt-creator
CMake build: Fix building sdktool against static Qt
On Windows. This is a hack, but enough for the purpose of packaging. Change-Id: I308b80dcf37e26e5c69f2fd6631b4b38854d68e0 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -25,6 +25,15 @@ find_package(Qt5
|
|||||||
REQUIRED
|
REQUIRED
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (MSVC)
|
||||||
|
# find out if Qt is static and set /MT if so
|
||||||
|
get_target_property(_input_type Qt5::Core TYPE)
|
||||||
|
if (${_input_type} STREQUAL "STATIC_LIBRARY")
|
||||||
|
string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
|
||||||
|
string(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
find_library(FWFoundation Foundation)
|
find_library(FWFoundation Foundation)
|
||||||
endif()
|
endif()
|
||||||
|
Reference in New Issue
Block a user