Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26c4760
commit 98b813e
Showing
22 changed files
with
1,020 additions
and
5,346 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
set(Natron_SOURCES NatronApp_main.cpp) | ||
add_executable(Natron ${Natron_SOURCES}) | ||
target_link_libraries(Natron | ||
PRIVATE | ||
NatronGui | ||
Python3::Python | ||
) | ||
target_include_directories(Natron | ||
PRIVATE | ||
.. | ||
../Gui | ||
../Engine | ||
../Global | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
cmake_minimum_required(VERSION 3.16.7) | ||
|
||
project(Natron | ||
VERSION "2.5.0" | ||
DESCRIPTION "Open Source Compositing Software" | ||
HOMEPAGE_URL "https://natrongithub.github.io/" | ||
LANGUAGES CXX C | ||
) | ||
|
||
set(CMAKE_CXX_STANDARD 11) | ||
|
||
find_package(Boost COMPONENTS headers serialization) | ||
find_package(Python3 COMPONENTS Interpreter Development) | ||
find_package(Qt5 5.15 CONFIG REQUIRED COMPONENTS Core Gui Network Widgets Concurrent) | ||
find_package(Shiboken2 5.15 CONFIG REQUIRED COMPONENTS libshiboken2 shiboken2) | ||
find_package(PySide2 5.15 CONFIG REQUIRED COMPONENTS pyside2) | ||
set(QT_VERSION_MAJOR 5) | ||
get_target_property(PYSIDE_INCLUDE_DIRS PySide2::pyside2 INTERFACE_INCLUDE_DIRECTORIES) | ||
string(REGEX REPLACE "(.*)QtCore$" "\\1" Qt5_INCLUDE_DIR ${Qt5Core_INCLUDE_DIRS}) | ||
set(QTCORE_INCLUDE_DIRS ${Qt5_INCLUDE_DIR} ${Qt5Core_INCLUDE_DIRS}) | ||
set(QTGUI_INCLUDE_DIRS ${Qt5Gui_INCLUDE_DIRS}) | ||
set(QTWIDGETS_INCLUDE_DIRS ${Qt5Widgets_INCLUDE_DIRS}) | ||
|
||
enable_testing() | ||
|
||
find_package(expat REQUIRED) | ||
|
||
if(UNIX AND NOT APPLE) | ||
find_package(ECM NO_MODULE) | ||
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_MODULE_PATH}) | ||
find_package(X11) | ||
find_package(Wayland COMPONENTS Client Egl) | ||
elseif(APPLE) | ||
enable_language(OBJCXX) | ||
endif() | ||
|
||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTORCC ON) | ||
|
||
add_subdirectory(libs) | ||
|
||
add_subdirectory(HostSupport) | ||
|
||
add_subdirectory(Engine) | ||
|
||
add_subdirectory(PythonBin) | ||
|
||
add_subdirectory(Renderer) | ||
|
||
add_subdirectory(Gui) | ||
|
||
add_subdirectory(Tests) | ||
|
||
add_subdirectory(App) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
include(FindPkgConfig) | ||
|
||
pkg_check_modules(Cairo REQUIRED cairo fontconfig) | ||
|
||
file(GLOB NatronEngine_HEADERS *.h) | ||
file(GLOB NatronEngine_SOURCES *.cpp) | ||
|
||
set(PYENGINE_OUT ${CMAKE_CURRENT_BINARY_DIR}/Qt${QT_VERSION_MAJOR}) | ||
set(PYENGINE_INCLUDE_DIRS ${PYSIDE_INCLUDE_DIRS} ${PYSIDE_INCLUDE_DIRS}/QtCore) | ||
list(APPEND PYENGINE_INCLUDE_DIRS ${QTCORE_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS}) | ||
list(JOIN PYENGINE_INCLUDE_DIRS ":" PYENGINE_INCS) | ||
set(PYENGINE_HEADER PySide2_Engine_Python.h) | ||
set(POST_SHIBOKEN ../tools/utils/runPostShiboken2.sh) | ||
|
||
set(shiboken_args | ||
"--enable-parent-ctor-heuristic" "--use-isnull-as-nb_nonzero" | ||
"--avoid-protected-hack" "--enable-pyside-extensions" | ||
"-I.:..:../Global:../libs/OpenFX/include:${PYENGINE_INCS}" | ||
"-T${PYSIDE_TYPESYSTEMS}" "--output-directory=${PYENGINE_OUT}" | ||
"${PYENGINE_HEADER}" "typesystem_engine.xml") | ||
|
||
execute_process(COMMAND ${Python3_EXECUTABLE} ../tools/utils/sourceList.py typesystem_engine.xml ${PYENGINE_OUT} | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
OUTPUT_VARIABLE PyEngine_SOURCES) | ||
set_property(SOURCE ${PyEngine_SOURCES} PROPERTY SKIP_AUTOGEN ON) | ||
add_custom_command(OUTPUT ${PyEngine_SOURCES} | ||
COMMAND Shiboken2::shiboken2 ${shiboken_args} | ||
COMMAND bash ${POST_SHIBOKEN} ${PYENGINE_OUT}/NatronEngine natronengine | ||
DEPENDS ${PYENGINE_HEADER} ${POST_SHIBOKEN} typesystem_engine.xml | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
if(UNIX AND NOT APPLE) | ||
set(XDG_LIBS ${X11_LIBRARIES}) | ||
if(Wayland_FOUND) | ||
set(XDG_LIBS Wayland::Client Wayland::Egl ${XDG_LIBS}) | ||
set(XDG_DEFS __NATRON_WAYLAND__) | ||
endif() | ||
endif() | ||
|
||
if(APPLE) | ||
list(APPEND NatronEngine_SOURCES QtUrlFix.mm) | ||
endif() | ||
|
||
list(APPEND NatronEngine_SOURCES | ||
${NatronEngine_SOURCES} | ||
${PyEngine_SOURCES} | ||
../Global/glad_source.c | ||
../Global/FStreamsSupport.cpp | ||
../Global/ProcInfo.cpp | ||
../Global/PythonUtils.cpp | ||
../Global/StrUtils.cpp | ||
../libs/SequenceParsing/SequenceParsing.cpp | ||
) | ||
add_library(NatronEngine STATIC ${NatronEngine_HEADERS} ${NatronEngine_SOURCES}) | ||
target_link_libraries(NatronEngine | ||
PUBLIC | ||
HostSupport | ||
Boost::headers | ||
Boost::serialization | ||
PRIVATE | ||
Shiboken2::libshiboken | ||
PySide2::pyside2 | ||
Qt5::Core | ||
Qt5::Concurrent | ||
Qt5::Network | ||
Python3::Module | ||
${Cairo_LIBRARIES} | ||
${XDG_LIBS} | ||
ceres | ||
hoedown | ||
mv | ||
openMVG | ||
tess | ||
) | ||
target_include_directories(NatronEngine | ||
PUBLIC | ||
../Global/glad$<IF:$<CONFIG:Debug>,Deb,Rel>/include | ||
PRIVATE | ||
${PYSIDE_INCLUDE_DIRS}/QtCore | ||
. | ||
.. | ||
../Global | ||
../libs/SequenceParsing | ||
${Cairo_INCLUDE_DIRS} | ||
${X11_INCLUDE_DIR} | ||
) | ||
target_compile_definitions(NatronEngine | ||
PRIVATE | ||
NATRON_CUSTOM_BUILD_USER_TOKEN=${BUILD_USER_NAME} | ||
NATRON_BUILD_NUMBER=0 | ||
${XDG_DEFS} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
file(GLOB NatronGui_HEADERS *.h) | ||
file(GLOB NatronGui_SOURCES *.cpp) | ||
|
||
set(PYGUI_OUT ${CMAKE_CURRENT_BINARY_DIR}/Qt${QT_VERSION_MAJOR}) | ||
set(PYGUI_INCLUDE_DIRS ${PYSIDE_INCLUDE_DIRS} ${PYSIDE_INCLUDE_DIRS}/QtCore | ||
${PYSIDE_INCLUDE_DIRS}/QtGui ${PYSIDE_INCLUDE_DIRS}/QtWidgets) | ||
list(APPEND PYGUI_INCLUDE_DIRS ${QTCORE_INCLUDE_DIRS} ${QTGUI_INCLUDE_DIRS} | ||
${QTWIDGETS_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS}) | ||
list(JOIN PYGUI_INCLUDE_DIRS ":" PYGUI_INCS) | ||
set(PYGUI_HEADER PySide2_Gui_Python.h) | ||
set(POST_SHIBOKEN ../tools/utils/runPostShiboken2.sh) | ||
|
||
set(shiboken_args | ||
"--enable-parent-ctor-heuristic" "--use-isnull-as-nb_nonzero" | ||
"--avoid-protected-hack" "--enable-pyside-extensions" | ||
"-I.:..:../Engine:../Global:../libs/OpenFX/include:${PYGUI_INCS}" | ||
"-T../Engine:${PYSIDE_TYPESYSTEMS}" "--output-directory=${PYGUI_OUT}" | ||
"${PYGUI_HEADER}" "typesystem_natronGui.xml") | ||
|
||
execute_process(COMMAND ${Python3_EXECUTABLE} ../tools/utils/sourceList.py typesystem_natronGui.xml ${PYGUI_OUT} | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
OUTPUT_VARIABLE PyGui_SOURCES) | ||
set_property(SOURCE ${PyGui_SOURCES} PROPERTY SKIP_AUTOGEN ON) | ||
add_custom_command(OUTPUT ${PyGui_SOURCES} | ||
COMMAND Shiboken2::shiboken2 ${shiboken_args} | ||
COMMAND bash ${POST_SHIBOKEN} ${PYGUI_OUT}/NatronGui natrongui | ||
DEPENDS ${PYGUI_HEADER} ${POST_SHIBOKEN} typesystem_natronGui.xml | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
if(APPLE) | ||
list(APPEND NatronGui_SOURCES QtMac.mm TaskBar.mm) | ||
endif() | ||
|
||
list(APPEND NatronGui_SOURCES | ||
${NatronGui_SOURCES} | ||
${PyGui_SOURCES} | ||
GuiResources.qrc | ||
) | ||
add_library(NatronGui STATIC ${NatronGui_HEADERS} ${NatronGui_SOURCES}) | ||
target_link_libraries(NatronGui | ||
PUBLIC | ||
Shiboken2::libshiboken | ||
PySide2::pyside2 | ||
Qt5::Core | ||
Qt5::Concurrent | ||
Qt5::Network | ||
Qt5::Gui | ||
Qt5::Widgets | ||
Python3::Module | ||
NatronEngine | ||
PRIVATE | ||
qhttpserver | ||
) | ||
target_include_directories(NatronGui | ||
PRIVATE | ||
${PYSIDE_INCLUDE_DIRS}/QtCore | ||
${PYSIDE_INCLUDE_DIRS}/QtGui | ||
${PYSIDE_INCLUDE_DIRS}/QtWidgets | ||
. | ||
.. | ||
../Engine | ||
../Global | ||
../libs/SequenceParsing | ||
../libs/qhttpserver/src | ||
${CMAKE_BINARY_DIR}/Engine/Qt${QT_VERSION_MAJOR}/NatronEngine | ||
) | ||
target_compile_definitions(NatronGui | ||
PRIVATE | ||
NATRON_CUSTOM_BUILD_USER_TOKEN=${BUILD_USER_NAME} | ||
NATRON_BUILD_NUMBER=0 | ||
QT_NO_KEYWORDS | ||
) |
Oops, something went wrong.