cutter/src/CMakeLists.txt

142 lines
3.5 KiB
CMake
Raw Normal View History

2017-03-30 16:58:57 +00:00
cmake_minimum_required(VERSION 3.1)
project(Iaito VERSION 1.0.0)
set(CMAKE_CXX_STANDARD 11)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
2017-03-30 16:58:57 +00:00
set(CMAKE_AUTORCC ON)
find_package(Qt5 REQUIRED COMPONENTS Core Widgets Gui WebKit WebKitWidgets)
2017-03-30 16:58:57 +00:00
2017-03-31 11:28:27 +00:00
if(WIN32)
2017-03-31 14:52:26 +00:00
# use radare2 libraries from submodule on windows
set(IAITO_WIN32_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../iaito_win32")
list(APPEND CMAKE_PREFIX_PATH "${IAITO_WIN32_DIR}")
if(CMAKE_SIZEOF_VOID_P EQUAL 8) # 64 bit
list(APPEND CMAKE_LIBRARY_PATH "${IAITO_WIN32_DIR}/radare2/lib64")
else()
list(APPEND CMAKE_LIBRARY_PATH "${IAITO_WIN32_DIR}/radare2/lib32")
endif()
2017-03-31 14:52:26 +00:00
set(RADARE2_INCLUDE_DIRS "${IAITO_WIN32_DIR}/radare2/include/libr" "${IAITO_WIN32_DIR}/include")
2017-03-31 11:28:27 +00:00
endif()
2017-03-30 16:58:57 +00:00
find_package(Radare2 REQUIRED)
include_directories(${RADARE2_INCLUDE_DIRS})
2017-04-11 11:14:02 +00:00
set(SOURCE_FILES
2017-03-31 14:52:26 +00:00
main.cpp
2017-03-30 16:58:57 +00:00
mainwindow.cpp
newfiledialog.cpp
optionsdialog.cpp
highlighter.cpp
qrcore.cpp
createnewdialog.cpp
hexascii_highlighter.cpp
webserverthread.cpp
widgets/pieview.cpp
widgets/sectionswidget.cpp
widgets/codegraphic.cpp
widgets/notepad.cpp
mdhighlighter.cpp
widgets/functionswidget.cpp
dialogs/renamedialog.cpp
dialogs/aboutdialog.cpp
widgets/importswidget.cpp
widgets/symbolswidget.cpp
widgets/relocswidget.cpp
widgets/commentswidget.cpp
widgets/stringswidget.cpp
widgets/flagswidget.cpp
2017-04-11 11:14:02 +00:00
widgets/memorywidget.cpp
2017-03-30 16:58:57 +00:00
qrdisasm.cpp
widgets/sdbdock.cpp
analthread.cpp
dialogs/commentsdialog.cpp
widgets/sidebar.cpp
helpers.cpp
widgets/omnibar.cpp
widgets/dashboard.cpp
dialogs/xrefsdialog.cpp
hexhighlighter.cpp)
set(HEADER_FILES
2017-03-31 14:52:26 +00:00
mainwindow.h
2017-03-30 16:58:57 +00:00
newfiledialog.h
optionsdialog.h
highlighter.h
qrcore.h
createnewdialog.h
hexascii_highlighter.h
webserverthread.h
widgets/pieview.h
widgets/sectionswidget.h
widgets/codegraphic.h
widgets/notepad.h
mdhighlighter.h
widgets/functionswidget.h
dialogs/renamedialog.h
dialogs/aboutdialog.h
widgets/importswidget.h
widgets/symbolswidget.h
widgets/relocswidget.h
widgets/commentswidget.h
widgets/stringswidget.h
widgets/flagswidget.h
2017-04-11 11:14:02 +00:00
widgets/memorywidget.h
2017-03-30 16:58:57 +00:00
qrdisasm.h
widgets/sdbdock.h
analthread.h
dialogs/commentsdialog.h
widgets/sidebar.h
helpers.h
widgets/omnibar.h
widgets/dashboard.h
dialogs/xrefsdialog.h
widgets/banned.h
hexhighlighter.h)
set(UI_FILES
2017-03-31 14:52:26 +00:00
mainwindow.ui
2017-03-30 16:58:57 +00:00
newfiledialog.ui
optionsdialog.ui
createnewdialog.ui
widgets/notepad.ui
widgets/functionswidget.ui
dialogs/aboutdialog.ui
dialogs/renamedialog.ui
widgets/importswidget.ui
widgets/symbolswidget.ui
widgets/relocswidget.ui
widgets/commentswidget.ui
widgets/stringswidget.ui
widgets/flagswidget.ui
2017-04-11 11:14:02 +00:00
widgets/memorywidget.ui
2017-03-30 16:58:57 +00:00
widgets/sdbdock.ui
dialogs/commentsdialog.ui
widgets/sidebar.ui
widgets/dashboard.ui
2017-03-30 16:58:57 +00:00
dialogs/xrefsdialog.ui)
set(QRC_FILES resources.qrc)
set(IAITO_VERSION_SUFFIX "-dev")
set(IAITO_VERSION_FULL "${PROJECT_VERSION}${IAITO_VERSION_SUFFIX}")
message("Building Iaito version ${IAITO_VERSION_FULL}")
add_definitions("-DAPP_VERSION=\"${IAITO_VERSION_FULL}\"")
add_executable(iaito ${UI_FILES} ${QRC_FILES} ${SOURCE_FILES} ${HEADER_FILES})
qt5_use_modules(iaito Core Widgets Gui WebKit WebKitWidgets)
2017-03-30 16:58:57 +00:00
target_link_libraries(iaito ${RADARE2_LIBRARIES})