diff --git a/ICommand/CMakeLists.txt b/ICommand/CMakeLists.txt index 7daf997..79833a2 100644 --- a/ICommand/CMakeLists.txt +++ b/ICommand/CMakeLists.txt @@ -26,5 +26,5 @@ list(APPEND ${component}_SOURCES_External ) add_library(${component} STATIC ${${component}_SOURCES} ${${component}_SOURCES_Internal} ${${component}_SOURCES_External}) -qt5_use_modules(${component} Widgets) +target_link_libraries(${component} Qt5::Widgets) target_include_directories(${component} PRIVATE ${CMAKE_SOURCE_DIR}) diff --git a/IConfig/CMakeLists.txt b/IConfig/CMakeLists.txt index 96606b9..13acfbf 100644 --- a/IConfig/CMakeLists.txt +++ b/IConfig/CMakeLists.txt @@ -27,6 +27,5 @@ list(APPEND ${component}_SOURCES ) add_library(${component} STATIC ${${component}_SOURCES}) -qt5_use_modules(${component} Widgets) -target_link_libraries(${component} Resources Script) +target_link_libraries(${component} Qt5::Widgets Resources Script) target_include_directories(${component} PRIVATE ${CMAKE_SOURCE_DIR}) diff --git a/IWin/CMakeLists.txt b/IWin/CMakeLists.txt index cf2f231..f4afa52 100644 --- a/IWin/CMakeLists.txt +++ b/IWin/CMakeLists.txt @@ -16,6 +16,5 @@ list(APPEND ${component}_SOURCES ) add_library(${component} STATIC ${${component}_SOURCES}) -qt5_use_modules(${component} Widgets) -target_link_libraries(${component} IWidgets) +target_link_libraries(${component} Qt5::Widgets IWidgets) target_include_directories(${component} PRIVATE ${CMAKE_SOURCE_DIR}) diff --git a/IdealIRC/CMakeLists.txt b/IdealIRC/CMakeLists.txt index cc1cf65..1bf8d47 100644 --- a/IdealIRC/CMakeLists.txt +++ b/IdealIRC/CMakeLists.txt @@ -46,8 +46,8 @@ if (MSVC) set_property(TARGET ${component} PROPERTY WIN32_EXECUTABLE true) endif() -qt5_use_modules(${component} Widgets) target_link_libraries(${component} + Qt5::Widgets ICommand IConfig IRCClient diff --git a/Resources/CMakeLists.txt b/Resources/CMakeLists.txt index f3cdbca..cf9535b 100644 --- a/Resources/CMakeLists.txt +++ b/Resources/CMakeLists.txt @@ -3,5 +3,5 @@ set(component "Resources") qt5_add_resources(${component}_SOURCES ${IIRC_SOURCE_DIR}/Resources/resources.qrc) add_library(${component} STATIC ${${component}_SOURCES}) -qt5_use_modules(${component} Core) +target_link_libraries(${component} Qt5::Core) target_include_directories(${component} PRIVATE ${CMAKE_SOURCE_DIR}) diff --git a/Script/Builtin/CMakeLists.txt b/Script/Builtin/CMakeLists.txt index 444feab..b2e1733 100644 --- a/Script/Builtin/CMakeLists.txt +++ b/Script/Builtin/CMakeLists.txt @@ -20,8 +20,10 @@ list(APPEND ${component}_SOURCES ) add_library(${component} STATIC ${${component}_SOURCES}) -qt5_use_modules(${component} Core) + if (UNIX) target_link_libraries(${component} m) endif() + +target_link_libraries(${component} Qt5::Core) target_include_directories(${component} PRIVATE ${CMAKE_SOURCE_DIR}) diff --git a/Script/CMakeLists.txt b/Script/CMakeLists.txt index 9fa9a5d..a7a3096 100644 --- a/Script/CMakeLists.txt +++ b/Script/CMakeLists.txt @@ -32,6 +32,5 @@ list(APPEND ${component}_SOURCES ) add_library(${component} STATIC ${${component}_SOURCES}) -qt5_use_modules(${component} Widgets) -target_link_libraries(${component} ScriptBuiltinFunctions Resources) +target_link_libraries(${component} Qt5::Widgets ScriptBuiltinFunctions Resources) target_include_directories(${component} PRIVATE ${CMAKE_SOURCE_DIR}) diff --git a/ScriptDialog/CMakeLists.txt b/ScriptDialog/CMakeLists.txt index c327ed8..4cf2d47 100644 --- a/ScriptDialog/CMakeLists.txt +++ b/ScriptDialog/CMakeLists.txt @@ -6,5 +6,5 @@ list(APPEND ${component}_SOURCES ) add_library(${component} STATIC ${${component}_SOURCES}) -qt5_use_modules(${component} Widgets) +target_link_libraries(${component} Qt5::Widgets) target_include_directories(${component} PRIVATE ${CMAKE_SOURCE_DIR}) diff --git a/ScriptFunctions/CMakeLists.txt b/ScriptFunctions/CMakeLists.txt index ac490d1..4c2c43c 100644 --- a/ScriptFunctions/CMakeLists.txt +++ b/ScriptFunctions/CMakeLists.txt @@ -10,5 +10,5 @@ list(APPEND ${component}_SOURCES ) add_library(${component} STATIC ${${component}_SOURCES}) -qt5_use_modules(${component} Widgets) +target_link_libraries(${component} Qt5::Widgets) target_include_directories(${component} PRIVATE ${CMAKE_SOURCE_DIR}) diff --git a/Widgets/CMakeLists.txt b/Widgets/CMakeLists.txt index 62cbd06..40cc67e 100644 --- a/Widgets/CMakeLists.txt +++ b/Widgets/CMakeLists.txt @@ -10,5 +10,5 @@ list(APPEND ${component}_SOURCES ) add_library(${component} STATIC ${${component}_SOURCES}) -qt5_use_modules(${component} Widgets) +target_link_libraries(${component} Qt5::Widgets) target_include_directories(${component} PRIVATE ${CMAKE_SOURCE_DIR})