-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
48 lines (39 loc) · 1.58 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
cmake_minimum_required(VERSION 2.8)
project(rgss_script_editor CXX C)
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Modules")
find_package(Qt5 REQUIRED Core Widgets Gui)
find_package(QScintilla REQUIRED)
find_package(ZLIB REQUIRED)
include_directories(
"${CMAKE_CURRENT_SOURCE_DIR}/src"
${RUBY_INCLUDE_DIRS} ${QT_INCLUDE_DIR}
${QSCINTILLA_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS})
file(GLOB QT_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/src/qt/*.hxx")
qt5_wrap_cpp(QT_MOC_OUTPUT ${QT_HEADERS})
set(EDITOR_SRCS
"${CMAKE_CURRENT_SOURCE_DIR}/src/main.cxx"
"${CMAKE_CURRENT_SOURCE_DIR}/src/ruby_data.cxx"
"${CMAKE_CURRENT_SOURCE_DIR}/src/qt/"
"${CMAKE_CURRENT_SOURCE_DIR}/src/qt/editor_widget.cxx"
"${CMAKE_CURRENT_SOURCE_DIR}/src/qt/main_window.cxx"
"${CMAKE_CURRENT_SOURCE_DIR}/src/qt/savediscard_dialog.cxx"
"${CMAKE_CURRENT_SOURCE_DIR}/src/qt/script_archive.cxx"
"${CMAKE_CURRENT_SOURCE_DIR}/src/qt/pinned_script_list.cxx"
"${CMAKE_CURRENT_SOURCE_DIR}/src/qt/search_bar.cxx"
"${CMAKE_CURRENT_SOURCE_DIR}/src/qt/goto_line_dialog.cxx"
)
set(CLI_SRCS
"${CMAKE_CURRENT_SOURCE_DIR}/src/ruby_data.cxx"
"${CMAKE_CURRENT_SOURCE_DIR}/src/cli.cxx"
)
list(APPEND EDITOR_SRCS "${QT_MOC_OUTPUT}")
add_executable("${PROJECT_NAME}" ${EDITOR_SRCS})
add_executable("${PROJECT_NAME}_cli" ${CLI_SRCS})
target_link_libraries("${PROJECT_NAME}"
Qt5::Widgets
${QSCINTILLA_LIBRARY} ${ZLIB_LIBRARIES})
target_link_libraries("${PROJECT_NAME}_cli"
Qt5::Widgets
${QSCINTILLA_LIBRARY} ${ZLIB_LIBRARIES})