CMake: Don't feed -fPIC to Visual C++, second try.
Qt5CoreConfigExtras.cmake in Qt 5.5.0 sets -fPIC unconditionally. Change-Id: Idf88b0f34b7cec40530702350b417ce1924db9f1 Reviewed-on: https://code.wireshark.org/review/11050 Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
parent
8201711e80
commit
6ea71d9ad2
|
@ -872,6 +872,11 @@ if(HAVE_LIBZLIB)
|
|||
include_directories(BEFORE ${ZLIB_INCLUDE_DIRS})
|
||||
endif()
|
||||
if (Qt5Widgets_FOUND)
|
||||
# Qt5CoreConfigExtras.cmake in Qt 5.5.0 sets -fPIC unconditionally.
|
||||
# https://bugreports.qt.io/browse/QTBUG-47942
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||
list(REMOVE_ITEM Qt5Widgets_EXECUTABLE_COMPILE_FLAGS "-fPIC")
|
||||
endif() # MSVC
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
||||
set (QT_FOUND ON)
|
||||
set (QT_LIBRARIES ${Qt5Widgets_LIBRARIES} ${Qt5PrintSupport_LIBRARIES})
|
||||
|
|
Loading…
Reference in New Issue