blob: 110251b902899aacdfa1df71b3da4d270d94aee6 (
plain)
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
|
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
if (BUILD_PYTHON)
set(PYTHON_CONSOLE_SRC
../3rdparty/python-console/ColumnFormatter.cpp
../3rdparty/python-console/ParseHelper.cpp
../3rdparty/python-console/ParseHelper.BlockParseState.cpp
../3rdparty/python-console/ParseHelper.BracketParseState.cpp
../3rdparty/python-console/ParseHelper.ContinuationParseState.cpp
../3rdparty/python-console/ParseMessage.cpp
../3rdparty/python-console/modified/pyredirector.cc
../3rdparty/python-console/modified/pyinterpreter.cc
../3rdparty/imgui/imgui_widgets.cpp
../3rdparty/imgui/imgui_draw.cpp
../3rdparty/imgui/imgui.cpp
../3rdparty/imgui/imgui_demo.cpp
../3rdparty/qtimgui/ImGuiRenderer.cpp
../3rdparty/qtimgui/QtImGui.cpp
)
endif()
aux_source_directory(. GUI_SOURCE_FILES)
aux_source_directory(${family}/ GUI_SOURCE_FILES)
set(_RESOURCES base.qrc ${family}/nextpnr.qrc)
qt5_add_resources(GUI_RESOURCE_FILES ${_RESOURCES})
set(GUI_LIBRARY_FILES_${ufamily} Qt5::Widgets Qt5::OpenGL ${OPENGL_LIBRARIES} QtPropertyBrowser PARENT_SCOPE)
add_library(gui_${family} STATIC ${GUI_SOURCE_FILES} ${PYTHON_CONSOLE_SRC} ${GUI_RESOURCE_FILES})
include(${family}/family.cmake)
target_include_directories(gui_${family} PRIVATE ../${family} ${family} ../3rdparty/QtPropertyBrowser/src ../3rdparty/imgui ../3rdparty/qtimgui/)
target_include_directories(gui_${family} PRIVATE ${CMAKE_BINARY_DIR}/generated)
if (BUILD_PYTHON)
target_include_directories(gui_${family} PRIVATE ../3rdparty/python-console ../3rdparty/python-console/modified)
endif()
target_compile_definitions(gui_${family} PRIVATE NEXTPNR_NAMESPACE=nextpnr_${family} ARCH_${ufamily} ARCHNAME=${family} QT_NO_KEYWORDS)
target_link_libraries(gui_${family} Qt5::Widgets)
foreach(lib_dep ${EXTRA_LIB_DEPS})
target_link_libraries(gui_${family} ${lib_dep})
endforeach()
|