Skip to content

Commit

Permalink
more cmake modernization where it's obvious
Browse files Browse the repository at this point in the history
  • Loading branch information
eteran committed Mar 28, 2024
1 parent d9334a8 commit 287a6b7
Show file tree
Hide file tree
Showing 26 changed files with 321 additions and 255 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.1)
cmake_minimum_required (VERSION 3.15)
project (edb LANGUAGES CXX VERSION 1.5.0)

enable_testing()
Expand Down
25 changes: 14 additions & 11 deletions plugins/Analyzer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
cmake_minimum_required (VERSION 3.1)
cmake_minimum_required (VERSION 3.15)
include("GNUInstallDirs")

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)

set(PluginName "Analyzer")
set(PLUGIN_NAME "Analyzer")

find_package(Qt5 5.0.0 REQUIRED Widgets)

add_library(${PluginName} SHARED
add_library(${PLUGIN_NAME} SHARED
Analyzer.cpp
Analyzer.h
AnalyzerWidget.cpp
Expand All @@ -25,14 +25,17 @@ add_library(${PluginName} SHARED
SpecifiedFunctions.ui
)

target_link_libraries(${PluginName} Qt5::Widgets edb)
target_link_libraries(${PLUGIN_NAME} Qt5::Widgets edb)

install (TARGETS ${PluginName} DESTINATION ${CMAKE_INSTALL_LIBDIR}/edb)
install (TARGETS ${PLUGIN_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/edb)

target_add_warnings(${PluginName})
target_add_warnings(${PLUGIN_NAME})

set_property(TARGET ${PluginName} PROPERTY CXX_EXTENSIONS OFF)
set_property(TARGET ${PluginName} PROPERTY CXX_STANDARD 17)
set_property(TARGET ${PluginName} PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET ${PluginName} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set_property(TARGET ${PluginName} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set_target_properties(${PLUGIN_NAME}
PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
)
27 changes: 15 additions & 12 deletions plugins/Assembler/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
cmake_minimum_required (VERSION 3.1)
cmake_minimum_required (VERSION 3.15)
include("GNUInstallDirs")

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)

set(PluginName "Assembler")
set(PLUGIN_NAME "Assembler")

find_package(Qt5 5.0.0 REQUIRED Widgets Xml XmlPatterns)

qt5_add_resources(QRC_SOURCES
qt5_add_resources(QRC_SOURCES
Assembler.qrc
)

foreach(FILE IN LISTS QRC_SOURCES)
set_property(SOURCE ${FILE} PROPERTY SKIP_UNITY_BUILD_INCLUSION ON)
endforeach()

add_library(${PluginName} SHARED
add_library(${PLUGIN_NAME} SHARED
${QRC_SOURCES}
Assembler.cpp
Assembler.h
Expand All @@ -29,14 +29,17 @@ add_library(${PluginName} SHARED
OptionsPage.ui
)

target_link_libraries(${PluginName} Qt5::Widgets Qt5::Xml Qt5::XmlPatterns edb)
target_link_libraries(${PLUGIN_NAME} Qt5::Widgets Qt5::Xml Qt5::XmlPatterns edb)

install (TARGETS ${PluginName} DESTINATION ${CMAKE_INSTALL_LIBDIR}/edb)
install (TARGETS ${PLUGIN_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/edb)

target_add_warnings(${PluginName})
target_add_warnings(${PLUGIN_NAME})

set_property(TARGET ${PluginName} PROPERTY CXX_EXTENSIONS OFF)
set_property(TARGET ${PluginName} PROPERTY CXX_STANDARD 17)
set_property(TARGET ${PluginName} PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET ${PluginName} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set_property(TARGET ${PluginName} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set_target_properties(${PLUGIN_NAME}
PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
)
25 changes: 14 additions & 11 deletions plugins/Backtrace/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
cmake_minimum_required (VERSION 3.1)
cmake_minimum_required (VERSION 3.15)
include("GNUInstallDirs")

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)

set(PluginName "Backtrace")
set(PLUGIN_NAME "Backtrace")

find_package(Qt5 5.0.0 REQUIRED Widgets)

add_library(${PluginName} SHARED
add_library(${PLUGIN_NAME} SHARED
Backtrace.cpp
Backtrace.h
CallStack.cpp
Expand All @@ -19,14 +19,17 @@ add_library(${PluginName} SHARED
DialogBacktrace.ui
)

target_link_libraries(${PluginName} Qt5::Widgets edb)
target_link_libraries(${PLUGIN_NAME} Qt5::Widgets edb)

install (TARGETS ${PluginName} DESTINATION ${CMAKE_INSTALL_LIBDIR}/edb)
install (TARGETS ${PLUGIN_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/edb)

target_add_warnings(${PluginName})
target_add_warnings(${PLUGIN_NAME})

set_property(TARGET ${PluginName} PROPERTY CXX_EXTENSIONS OFF)
set_property(TARGET ${PluginName} PROPERTY CXX_STANDARD 17)
set_property(TARGET ${PluginName} PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET ${PluginName} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set_property(TARGET ${PluginName} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set_target_properties(${PLUGIN_NAME}
PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
)
25 changes: 14 additions & 11 deletions plugins/BinaryInfo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
cmake_minimum_required (VERSION 3.1)
cmake_minimum_required (VERSION 3.15)
include("GNUInstallDirs")

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)

set(PluginName "BinaryInfo")
set(PLUGIN_NAME "BinaryInfo")

find_package(Qt5 5.0.0 REQUIRED Widgets)

add_library(${PluginName} SHARED
add_library(${PLUGIN_NAME} SHARED
BinaryInfo.cpp
BinaryInfo.h
demangle.h
Expand All @@ -32,15 +32,18 @@ add_library(${PluginName} SHARED
symbols.h
)

target_link_libraries(${PluginName} Qt5::Widgets PE ELF edb)
target_link_libraries(${PLUGIN_NAME} Qt5::Widgets PE ELF edb)

install (TARGETS ${PluginName} DESTINATION ${CMAKE_INSTALL_LIBDIR}/edb)
install (TARGETS ${PLUGIN_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/edb)

target_add_warnings(${PluginName})
target_add_warnings(${PLUGIN_NAME})

set_property(TARGET ${PluginName} PROPERTY CXX_EXTENSIONS OFF)
set_property(TARGET ${PluginName} PROPERTY CXX_STANDARD 17)
set_property(TARGET ${PluginName} PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET ${PluginName} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set_property(TARGET ${PluginName} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set_target_properties(${PLUGIN_NAME}
PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
)

25 changes: 14 additions & 11 deletions plugins/BinarySearcher/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
cmake_minimum_required (VERSION 3.1)
cmake_minimum_required (VERSION 3.15)
include("GNUInstallDirs")

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)

set(PluginName "BinarySearcher")
set(PLUGIN_NAME "BinarySearcher")

find_package(Qt5 5.0.0 REQUIRED Widgets)

add_library(${PluginName} SHARED
add_library(${PLUGIN_NAME} SHARED
BinarySearcher.cpp
BinarySearcher.h
DialogAsciiString.cpp
Expand All @@ -23,15 +23,18 @@ add_library(${PluginName} SHARED
DialogResults.ui
)

target_link_libraries(${PluginName} Qt5::Widgets edb)
target_link_libraries(${PLUGIN_NAME} Qt5::Widgets edb)

install (TARGETS ${PluginName} DESTINATION ${CMAKE_INSTALL_LIBDIR}/edb)
install (TARGETS ${PLUGIN_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/edb)

target_add_warnings(${PluginName})
target_add_warnings(${PLUGIN_NAME})

set_property(TARGET ${PluginName} PROPERTY CXX_EXTENSIONS OFF)
set_property(TARGET ${PluginName} PROPERTY CXX_STANDARD 17)
set_property(TARGET ${PluginName} PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET ${PluginName} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set_property(TARGET ${PluginName} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set_target_properties(${PLUGIN_NAME}
PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
)

25 changes: 14 additions & 11 deletions plugins/Bookmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
cmake_minimum_required (VERSION 3.1)
cmake_minimum_required (VERSION 3.15)
include("GNUInstallDirs")

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)

set(PluginName "Bookmarks")
set(PLUGIN_NAME "Bookmarks")

find_package(Qt5 5.0.0 REQUIRED Widgets)

add_library(${PluginName} SHARED
add_library(${PLUGIN_NAME} SHARED
Bookmarks.cpp
Bookmarks.h
BookmarkWidget.cpp
Expand All @@ -19,14 +19,17 @@ add_library(${PluginName} SHARED
BookmarkWidget.ui
)

target_link_libraries(${PluginName} Qt5::Widgets edb)
target_link_libraries(${PLUGIN_NAME} Qt5::Widgets edb)

install (TARGETS ${PluginName} DESTINATION ${CMAKE_INSTALL_LIBDIR}/edb)
install (TARGETS ${PLUGIN_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/edb)

target_add_warnings(${PluginName})
target_add_warnings(${PLUGIN_NAME})

set_property(TARGET ${PluginName} PROPERTY CXX_EXTENSIONS OFF)
set_property(TARGET ${PluginName} PROPERTY CXX_STANDARD 17)
set_property(TARGET ${PluginName} PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET ${PluginName} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set_property(TARGET ${PluginName} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set_target_properties(${PLUGIN_NAME}
PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
)
25 changes: 14 additions & 11 deletions plugins/BreakpointManager/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
cmake_minimum_required (VERSION 3.1)
cmake_minimum_required (VERSION 3.15)
include("GNUInstallDirs")

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)

set(PluginName "BreakpointManager")
set(PLUGIN_NAME "BreakpointManager")

find_package(Qt5 5.0.0 REQUIRED Widgets)

add_library(${PluginName} SHARED
add_library(${PLUGIN_NAME} SHARED
BreakpointManager.cpp
BreakpointManager.h
)

target_link_libraries(${PluginName} Qt5::Widgets edb)
target_link_libraries(${PLUGIN_NAME} Qt5::Widgets edb)

install (TARGETS ${PluginName} DESTINATION ${CMAKE_INSTALL_LIBDIR}/edb)
install (TARGETS ${PLUGIN_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/edb)

target_add_warnings(${PluginName})
target_add_warnings(${PLUGIN_NAME})

set_property(TARGET ${PluginName} PROPERTY CXX_EXTENSIONS OFF)
set_property(TARGET ${PluginName} PROPERTY CXX_STANDARD 17)
set_property(TARGET ${PluginName} PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET ${PluginName} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set_property(TARGET ${PluginName} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set_target_properties(${PLUGIN_NAME}
PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
)
2 changes: 1 addition & 1 deletion plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.1)
cmake_minimum_required (VERSION 3.15)

add_definitions(-DQT_PLUGIN)

Expand Down
25 changes: 14 additions & 11 deletions plugins/CheckVersion/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
cmake_minimum_required (VERSION 3.1)
cmake_minimum_required (VERSION 3.15)
include("GNUInstallDirs")

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)

set(PluginName "CheckVersion")
set(PLUGIN_NAME "CheckVersion")

find_package(Qt5 5.0.0 REQUIRED Widgets Network)

add_library(${PluginName} SHARED
add_library(${PLUGIN_NAME} SHARED
CheckVersion.cpp
CheckVersion.h
OptionsPage.cpp
OptionsPage.h
OptionsPage.ui
)

target_link_libraries(${PluginName} Qt5::Widgets Qt5::Network edb)
target_link_libraries(${PLUGIN_NAME} Qt5::Widgets Qt5::Network edb)

install (TARGETS ${PluginName} DESTINATION ${CMAKE_INSTALL_LIBDIR}/edb)
install (TARGETS ${PLUGIN_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/edb)

target_add_warnings(${PluginName})
target_add_warnings(${PLUGIN_NAME})

set_property(TARGET ${PluginName} PROPERTY CXX_EXTENSIONS OFF)
set_property(TARGET ${PluginName} PROPERTY CXX_STANDARD 17)
set_property(TARGET ${PluginName} PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET ${PluginName} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set_property(TARGET ${PluginName} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
set_target_properties(${PLUGIN_NAME}
PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
)
Loading

0 comments on commit 287a6b7

Please sign in to comment.