diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 81c39d588..e076898fb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -138,12 +138,17 @@ if(${NC_QT5}) macro(qt4_wrap_cpp) endmacro() - set(QT_LIBRARIES Qt5::Core Qt5::Widgets) + set(NC_QT_CORE Qt5::Core) + set(NC_QT_WIDGETS Qt5::Widgets) else() # Find Qt4. find_package(Qt4 REQUIRED QtCore QtGui) include(${QT_USE_FILE}) + # Too lazy to filter the right libraries from ${QT_LIBRARIES}. + set(NC_QT_CORE ${QT_LIBRARIES}) + set(NC_QT_WIDGETS ${QT_LIBRARIES}) + # This is used to produce standalone bundles on Windows. include(DeployQt4) endif() diff --git a/src/ida-plugin/CMakeLists.txt b/src/ida-plugin/CMakeLists.txt index ff3bc38f7..35b89d649 100644 --- a/src/ida-plugin/CMakeLists.txt +++ b/src/ida-plugin/CMakeLists.txt @@ -38,7 +38,7 @@ endif() qt4_wrap_cpp(SOURCES ${MOC_HEADERS} OPTIONS -DQ_MOC_RUN) add_library(ida-plugin SHARED ${SOURCES}) -target_link_libraries(ida-plugin nc nc-gui ${Boost_LIBRARIES} ${QT_LIBRARIES} ${IDA_LIBRARIES}) +target_link_libraries(ida-plugin nc nc-gui ${Boost_LIBRARIES} ${NC_QT_CORE} ${NC_QT_WIDGETS} ${IDA_LIBRARIES}) set_target_properties(ida-plugin PROPERTIES OUTPUT_NAME "snowman" PREFIX "" SUFFIX "${IDA_PLUGIN_EXT}") install(TARGETS ida-plugin RUNTIME DESTINATION bin LIBRARY DESTINATION lib) diff --git a/src/nc/CMakeLists.txt b/src/nc/CMakeLists.txt index 0693dbfb7..de1ca69e7 100644 --- a/src/nc/CMakeLists.txt +++ b/src/nc/CMakeLists.txt @@ -330,7 +330,7 @@ list(APPEND SOURCES "${CMAKE_CURRENT_BINARY_DIR}/common/Version.cpp") qt4_wrap_cpp(SOURCES ${MOC_HEADERS} OPTIONS -DQ_MOC_RUN) add_library(nc ${SOURCES}) -target_link_libraries(nc capstone-static udis86 iberty undname ${Boost_LIBRARIES} ${QT_LIBRARIES}) +target_link_libraries(nc capstone-static udis86 iberty undname ${Boost_LIBRARIES} ${NC_QT_CORE}) add_subdirectory(gui) diff --git a/src/nc/gui/CMakeLists.txt b/src/nc/gui/CMakeLists.txt index 5437cf0dc..3dad9fac4 100644 --- a/src/nc/gui/CMakeLists.txt +++ b/src/nc/gui/CMakeLists.txt @@ -76,6 +76,6 @@ set(SOURCES qt4_wrap_cpp(SOURCES ${MOC_HEADERS} OPTIONS -DQ_MOC_RUN) add_library(nc-gui ${SOURCES}) -target_link_libraries(nc-gui nc ${Boost_LIBRARIES} ${QT_LIBRARIES}) +target_link_libraries(nc-gui nc ${Boost_LIBRARIES} ${NC_QT_CORE} ${NC_QT_WIDGETS}) # vim:set et sts=4 sw=4 nospell: diff --git a/src/nocode/CMakeLists.txt b/src/nocode/CMakeLists.txt index 12c502dc6..cecc8e05b 100644 --- a/src/nocode/CMakeLists.txt +++ b/src/nocode/CMakeLists.txt @@ -3,7 +3,7 @@ set(SOURCES ) add_executable(nocode ${SOURCES}) -target_link_libraries(nocode nc ${Boost_LIBRARIES} ${QT_LIBRARIES}) +target_link_libraries(nocode nc ${Boost_LIBRARIES} ${NC_QT_CORE}) if (NOT ${IDA_PLUGIN_ENABLED}) install(TARGETS nocode RUNTIME DESTINATION bin) diff --git a/src/snowman/CMakeLists.txt b/src/snowman/CMakeLists.txt index d76b0c06b..987b376cc 100644 --- a/src/snowman/CMakeLists.txt +++ b/src/snowman/CMakeLists.txt @@ -3,7 +3,7 @@ set(SOURCES ) add_executable(snowman WIN32 ${SOURCES}) -target_link_libraries(snowman nc nc-gui ${Boost_LIBRARIES} ${QT_LIBRARIES}) +target_link_libraries(snowman nc nc-gui ${Boost_LIBRARIES} ${NC_QT_CORE} ${NC_QT_WIDGETS}) if(MSVC) set_target_properties(snowman PROPERTIES LINK_FLAGS /ENTRY:mainCRTStartup) endif()