1 cmake_minimum_required(VERSION 2.8.9)
4 set(CMAKE_VERBOSE_MAKEFILE on)
7 set(CMAKE_INCLUDE_CURRENT_DIR ON)
8 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules")
10 find_package(Qt5Widgets)
11 find_package(Qt5 CONFIG REQUIRED Widgets Gui)
12 find_package(QuaZip REQUIRED)
13 find_package(LLVM REQUIRED)
14 find_package(PkgConfig)
15 pkg_check_modules(LOG4CXX REQUIRED liblog4cxx)
16 pkg_check_modules(GUILE REQUIRED guile-2.0)
17 FIND_PACKAGE(SWIG REQUIRED)
18 INCLUDE(${SWIG_USE_FILE})
20 add_definitions(${LOG4CXX_CFLAGS})
21 add_definitions(${GUILE_CFLAGS})
23 add_definitions(${LLVM_CFLAGS})
24 add_definitions(-std=c++11 -Wall -Wextra)
25 add_definitions(-DQT_NO_KEYWORDS)
27 separate_arguments(LLVM_LDFLAGS)
28 separate_arguments(LLVM_LIBS)
30 INCLUDE_DIRECTORIES("src")
36 SET(CMAKE_SWIG_FLAGS -Linkage passive)
37 #FIND_PACKAGE(PythonLibs)
38 #INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
39 SET_SOURCE_FILES_PROPERTIES(src/bindings/guile/frida.i PROPERTIES CPLUSPLUS ON)
40 SWIG_ADD_MODULE(frida-guile guile src/bindings/guile/frida.i)
41 SWIG_LINK_LIBRARIES(frida-guile ${GUILE_LDFLAGS})
49 src/core/InformationManager.cxx
50 src/core/BasicBlock.cxx
52 src/gui/Mainwindow.cxx
53 src/gui/widgets/BasicBlockWidget.cxx
54 src/gui/widgets/CFGScene.cxx
55 src/gui/widgets/ScriptingDock.cxx
56 src/gui/widgets/FunctionWidget.cxx
57 src/gui/dialogs/NewFunctionDialog.cxx
58 src/gui/dialogs/SimpleStringDialog.cxx
59 src/disassembler/Disassembler.cxx
60 src/disassembler/llvm/LLVMDisassembler.cxx
64 src/core/InformationManager.hxx
66 src/gui/Mainwindow.hxx
67 src/gui/widgets/BasicBlockWidget.hxx
68 src/gui/widgets/CFGScene.hxx
69 src/gui/widgets/ScriptingDock.hxx
70 src/gui/widgets/FunctionWidget.hxx
71 src/gui/dialogs/NewFunctionDialog.hxx
72 src/gui/dialogs/SimpleStringDialog.hxx
73 src/disassembler/llvm/LLVMDisassembler.hxx
74 src/disassembler/Disassembler.hxx
77 ADD_EXECUTABLE(frida src/main.cxx ${frida_SOURCES} ${frida_HEADERS_MOC})
78 #ADD_LIBRARY(llvm SHARED )
80 ADD_DEFINITIONS(${QT_DEFINITIONS})
82 qt5_use_modules(frida Widgets)
84 TARGET_LINK_LIBRARIES(frida
99 set(plugin_guile_SOURCES
100 src/bindings/Interpreter.cxx
101 src/bindings/Guile.cxx)
103 set(plugin_guile_HEADERS
104 src/bindings/Interpreter.hxx
105 src/bindings/Guile.hxx)
107 add_library(guilePlugin MODULE ${plugin_guile_SOURCES} ${plugin_guile_HEADERS_MOC})
108 qt5_use_modules(guilePlugin Core)
109 target_link_libraries(guilePlugin ${QT_LIBRARIES} ${GUILE_LDFLAGS})
115 set(fridatest_SOURCES
117 src/core/tests/BasicBlockTest.cxx
118 src/core/tests/FunctionTest.cxx
122 add_executable(fridatest ${fridatest_SOURCES})
124 qt5_use_modules(fridatest Widgets)
126 #ADD_SUBDIRECTORY(/usr/src/gtest gtest)
127 ADD_SUBDIRECTORY(/usr/src/gmock gmock)
129 target_link_libraries(fridatest gmock gtest ${QT_LIBRARIES} ${LLVM_LDFLAGS} -lLLVM-3.5 ${LLVM_SYSTEM_LIBS} ${LOG4CXX_LDFLAGS} ${GUILE_LDFLAGS} ${QUAZIP_LIBRARIES})
130 add_test(NAME fridatest COMMAND fridatest ${CMAKE_SOURCE_DIR})