2018-06-20 22:13:49 +08:00
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
|
2018-06-29 14:18:15 +08:00
|
|
|
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
|
2018-10-21 16:11:20 +08:00
|
|
|
../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
|
2018-06-29 14:18:15 +08:00
|
|
|
)
|
|
|
|
endif()
|
2018-06-28 19:57:11 +08:00
|
|
|
|
2018-06-20 22:13:49 +08:00
|
|
|
aux_source_directory(. GUI_SOURCE_FILES)
|
2018-06-21 19:41:16 +08:00
|
|
|
aux_source_directory(${family}/ GUI_SOURCE_FILES)
|
2018-06-28 19:57:11 +08:00
|
|
|
|
2018-06-22 18:49:20 +08:00
|
|
|
set(_RESOURCES base.qrc ${family}/nextpnr.qrc)
|
2018-06-20 22:13:49 +08:00
|
|
|
|
|
|
|
qt5_add_resources(GUI_RESOURCE_FILES ${_RESOURCES})
|
|
|
|
|
|
|
|
set(GUI_LIBRARY_FILES_${ufamily} Qt5::Widgets Qt5::OpenGL ${OPENGL_LIBRARIES} QtPropertyBrowser PARENT_SCOPE)
|
|
|
|
|
2018-06-28 19:57:11 +08:00
|
|
|
add_library(gui_${family} STATIC ${GUI_SOURCE_FILES} ${PYTHON_CONSOLE_SRC} ${GUI_RESOURCE_FILES})
|
2018-07-10 19:54:05 +08:00
|
|
|
include(${family}/family.cmake)
|
2018-06-20 22:13:49 +08:00
|
|
|
|
2018-10-21 16:11:20 +08:00
|
|
|
target_include_directories(gui_${family} PRIVATE ../${family} ${family} ../3rdparty/QtPropertyBrowser/src ../3rdparty/imgui ../3rdparty/qtimgui/)
|
2021-07-25 19:06:51 +08:00
|
|
|
target_include_directories(gui_${family} PRIVATE ${CMAKE_BINARY_DIR}/generated)
|
2018-06-29 14:18:15 +08:00
|
|
|
if (BUILD_PYTHON)
|
|
|
|
target_include_directories(gui_${family} PRIVATE ../3rdparty/python-console ../3rdparty/python-console/modified)
|
|
|
|
endif()
|
|
|
|
|
2018-06-20 22:13:49 +08:00
|
|
|
target_compile_definitions(gui_${family} PRIVATE NEXTPNR_NAMESPACE=nextpnr_${family} ARCH_${ufamily} ARCHNAME=${family} QT_NO_KEYWORDS)
|
2021-04-14 17:14:51 +08:00
|
|
|
|
2018-06-20 22:13:49 +08:00
|
|
|
target_link_libraries(gui_${family} Qt5::Widgets)
|
2021-03-19 04:47:06 +08:00
|
|
|
|
|
|
|
foreach(lib_dep ${EXTRA_LIB_DEPS})
|
|
|
|
target_link_libraries(gui_${family} ${lib_dep})
|
|
|
|
endforeach()
|