From 3462bbaa6140f074c2abe9c5b7b48d68fdff9f57 Mon Sep 17 00:00:00 2001 From: Janet Berlin Date: Fri, 20 Jan 2017 16:04:09 -0800 Subject: [PATCH 01/16] rename function that resets comments so it doesn't clash w/ v1 --- src/ui/ExprSpecParser.y | 4 ++-- src/ui/ExprSpecParserLex.l | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ui/ExprSpecParser.y b/src/ui/ExprSpecParser.y index 7be57af3..33916129 100644 --- a/src/ui/ExprSpecParser.y +++ b/src/ui/ExprSpecParser.y @@ -504,7 +504,7 @@ static void yyerror(const char* /*msg*/) if (e != end) ParseError += "..."; } -extern void specResetCounters(std::vector >& comments); +extern void exprSpecResetCounters(std::vector >& comments); /* CallParser - This is our entrypoint from the rest of the expr library. @@ -529,7 +529,7 @@ bool ExprSpecParse(std::vector& outputEditables, ParseStr=str; // setup and startup parser - specResetCounters(comments); // reset lineNumber and columnNumber in scanner + exprSpecResetCounters(comments); // reset lineNumber and columnNumber in scanner yy_buffer_state* buffer = yy_scan_string(str); // setup lexer ParseResult = 0; int resultCode = yyparse(); // parser (don't care if it is a parse error) diff --git a/src/ui/ExprSpecParserLex.l b/src/ui/ExprSpecParserLex.l index 9c6c4564..8715baeb 100644 --- a/src/ui/ExprSpecParserLex.l +++ b/src/ui/ExprSpecParserLex.l @@ -45,13 +45,12 @@ // TODO: make this thread safe static int columnNumber=0; // really buffer position static int lineNumber=0; // not used - static std::vector >* comments=0; extern char* specRegisterToken(char* tok); -void specResetCounters(std::vector >& commentsIn){ - columnNumber=lineNumber=0; - comments=&commentsIn; +void exprSpecResetCounters(std::vector >& commentsIn){ + columnNumber=lineNumber=0; + comments=&commentsIn; } int yypos(); // forward declare From d87a661def3a2da56950f470d643d2b49ef4b119 Mon Sep 17 00:00:00 2001 From: Janet Berlin Date: Mon, 23 Jan 2017 10:03:05 -0800 Subject: [PATCH 02/16] namespace flex/bison function to avoid clashes --- src/ui/ExprSpecParser.y | 6 ++++-- src/ui/ExprSpecParserLex.l | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ui/ExprSpecParser.y b/src/ui/ExprSpecParser.y index 33916129..d6f3f1d0 100644 --- a/src/ui/ExprSpecParser.y +++ b/src/ui/ExprSpecParser.y @@ -504,7 +504,9 @@ static void yyerror(const char* /*msg*/) if (e != end) ParseError += "..."; } -extern void exprSpecResetCounters(std::vector >& comments); +namespace SeExpr2 { +extern void specResetCounters(std::vector >& comments); +} /* CallParser - This is our entrypoint from the rest of the expr library. @@ -529,7 +531,7 @@ bool ExprSpecParse(std::vector& outputEditables, ParseStr=str; // setup and startup parser - exprSpecResetCounters(comments); // reset lineNumber and columnNumber in scanner + SeExpr2::specResetCounters(comments); // reset lineNumber and columnNumber in scanner yy_buffer_state* buffer = yy_scan_string(str); // setup lexer ParseResult = 0; int resultCode = yyparse(); // parser (don't care if it is a parse error) diff --git a/src/ui/ExprSpecParserLex.l b/src/ui/ExprSpecParserLex.l index 8715baeb..4f6f1092 100644 --- a/src/ui/ExprSpecParserLex.l +++ b/src/ui/ExprSpecParserLex.l @@ -48,10 +48,12 @@ static int lineNumber=0; // not used static std::vector >* comments=0; extern char* specRegisterToken(char* tok); -void exprSpecResetCounters(std::vector >& commentsIn){ +namespace SeExpr2 { +void specResetCounters(std::vector >& commentsIn){ columnNumber=lineNumber=0; comments=&commentsIn; } +} int yypos(); // forward declare From c3e82e96296a819709ef9166f69504e0091b2f51 Mon Sep 17 00:00:00 2001 From: Janet Berlin Date: Mon, 30 Jan 2017 16:58:02 -0800 Subject: [PATCH 03/16] fixes SEEXPR-180 error with unsupported local functions --- src/SeExpr/ExprNode.cpp | 24 +++++++++++++----------- src/SeExpr/ExprParser.y | 4 ++-- src/tests/llvmtest.se | 5 ++++- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/SeExpr/ExprNode.cpp b/src/SeExpr/ExprNode.cpp index df5c0daf..971d2032 100644 --- a/src/SeExpr/ExprNode.cpp +++ b/src/SeExpr/ExprNode.cpp @@ -135,13 +135,9 @@ ExprType ExprModuleNode::prep(bool wantScalar, ExprVarEnvBuilder& envBuilder) { } ExprType ExprPrototypeNode::prep(bool wantScalar, ExprVarEnvBuilder& envBuilder) { - // TODO: implement prototype - bool error = false; - checkCondition(false, "Prototypes are currently not supported", error); - return ExprType().Error(); -#if 0 bool error = false; +#if 0 // TODO: implement prototype if (_retTypeSet) checkCondition(returnType().isValid(), "Function has bad return type", error); _argTypes.clear(); @@ -154,14 +150,15 @@ ExprType ExprPrototypeNode::prep(bool wantScalar, ExprVarEnvBuilder& envBuilder) std::cerr << "after create localvar phi " << localVar->getPhi() << std::endl; child(c)->prep(wantScalar, envBuilder); } - +#else + checkCondition(false, "Prototypes are currently not supported", error); +#endif if (error) setType(ExprType().Error()); else setType(ExprType().None().Varying()); return _type; -#endif } void ExprPrototypeNode::addArgTypes(ExprNode* surrogate) { @@ -187,9 +184,10 @@ void ExprPrototypeNode::addArgs(ExprNode* surrogate) { } ExprType ExprLocalFunctionNode::prep(bool wantScalar, ExprVarEnvBuilder& envBuilder) { -#if 0 // TODO: no local functions for now bool error = false; +#if 0 // TODO: no local functions for now + // prep prototype and check for errors ExprPrototypeNode* prototype = (ExprPrototypeNode*)child(0); ExprVarEnv functionEnv; @@ -222,12 +220,16 @@ ExprType ExprLocalFunctionNode::prep(bool wantScalar, ExprVarEnvBuilder& envBuil checkCondition(false, "Invalid type for blockType is " + blockType.toString(), error); error = true; } - return _type = error ? ExprType().Error() : ExprType().None().Varying(); #else - bool error = false; checkCondition(false, "Local functions are currently not supported.", error); - return ExprType().Error(); #endif + + if (error) + setType(ExprType().Error()); + else + setType(ExprType().None().Varying()); + + return _type; } // TODO: write buildInterpreter for local function node diff --git a/src/SeExpr/ExprParser.y b/src/SeExpr/ExprParser.y index 4d898e01..d8d6b177 100644 --- a/src/SeExpr/ExprParser.y +++ b/src/SeExpr/ExprParser.y @@ -198,11 +198,11 @@ typeListOptional: typeList: typeDeclare { $$ = NODE(@$.first_column, @$.last_column, Node); SeExpr2::ExprType type = SeExpr2::ExprType($1.type, $1.dim, $1.lifetime); - SeExpr2::ExprNode* varNode = NODE2(@$.first_column, @$.last_column, VarNode, 0, type); + SeExpr2::ExprNode* varNode = NODE2(@$.first_column, @$.last_column, VarNode, "", type); $$->addChild(varNode); } | typeList ',' typeDeclare { $$ = $1; SeExpr2::ExprType type = SeExpr2::ExprType($3.type, $3.dim, $3.lifetime); - SeExpr2::ExprNode* varNode = NODE2(@3.first_column, @3.last_column, VarNode, 0, type); + SeExpr2::ExprNode* varNode = NODE2(@3.first_column, @3.last_column, VarNode, "", type); $$->addChild(varNode); } ; diff --git a/src/tests/llvmtest.se b/src/tests/llvmtest.se index 4fd370f8..da1264ea 100644 --- a/src/tests/llvmtest.se +++ b/src/tests/llvmtest.se @@ -230,6 +230,9 @@ ; CHECK: 5 7 9 "def testfun(FLOAT[3] a, FLOAT[3] b) {a+b} testfun([1,2,3],[4,5,6])" 3 +; CHECK: undefined +"extern FLOAT sin(FLOAT) sin(u)" 3 + "printf("test %v %v", [.1,.2,.3], [.4,.5,.6])" 1 "pick(.5, 1,10)" 1 @@ -239,4 +242,4 @@ "deepWater([1,2,3],1,1,1,1,1,1,1,1,[3,4,5],2,4,5,6)" 3 ; TODO: need filename -;"particalSampler([1,2,3],"filename",1,2,3,4,5)" 3 \ No newline at end of file +;"particalSampler([1,2,3],"filename",1,2,3,4,5)" 3 From d40c58b97b138afffce768a9051289a1b652de9e Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Tue, 8 Nov 2016 19:04:43 -0800 Subject: [PATCH 04/16] build-info: add a mode for querying PyQt's sip flags Signed-off-by: David Aguilar --- src/build/build-info | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/build/build-info b/src/build/build-info index 8f43bb30..45751748 100755 --- a/src/build/build-info +++ b/src/build/build-info @@ -21,6 +21,7 @@ def main(): ('python-site', python_site), ('python-inc', python_inc), ('pyqt4-sip', pyqt4_sip), + ('pyqt-sip-flags', pyqt_sip_flags), ('sip-inc', sip_inc), ) @@ -60,6 +61,16 @@ def pyqt4_sip(args): return pkg_cfg['pyqt_sip_dir'] +def pyqt_sip_flags(args): + try: + import PyQt5.Qt + return PyQt5.Qt.PYQT_CONFIGURATION['sip_flags'] + except ImportError: + from PyQt4 import pyqtconfig + pkg_cfg = pyqtconfig._pkg_config + return pkg_cfg['pyqt_sip_flags'] + + def sip_inc(args): pkg_cfg = sipconfig._pkg_config return pkg_cfg['sip_inc_dir'] From 97d28f4acd0c1f81feab00f359adbd17f7767182 Mon Sep 17 00:00:00 2001 From: Janet Berlin Date: Tue, 25 Jul 2017 17:42:27 -0700 Subject: [PATCH 05/16] qt: add Qt5 compatibility Make the codebase Qt4 and Qt5 compatible. --- CMakeLists.txt | 24 ++++++- src/demos/imageEditor/ImageEditorDialog.h | 2 +- src/demos/imageEditor/imageEditor.cpp | 16 ++--- src/demos/segraph/segraph.cpp | 2 +- src/demos/segraph2/Functions.h | 2 +- src/demos/segraph2/Graph.h | 8 +-- src/demos/segraph2/GraphWindow.cpp | 4 +- src/demos/segraph2/GraphWindow.h | 20 +++--- src/demos/segraph2/main.cpp | 2 +- src/ui/CMakeLists.txt | 76 ++++++++++++++++------- src/ui/EditMain.cpp | 2 +- src/ui/ExprBrowser.cpp | 49 +++++++++------ src/ui/ExprBrowser.h | 4 +- src/ui/ExprColorCurve.cpp | 20 +++--- src/ui/ExprColorCurve.h | 10 +-- src/ui/ExprColorSwatch.cpp | 24 +++---- src/ui/ExprColorSwatch.h | 6 +- src/ui/ExprCompletionModel.cpp | 2 +- src/ui/ExprCompletionModel.h | 2 +- src/ui/ExprControl.cpp | 52 ++++++++-------- src/ui/ExprControl.h | 16 ++--- src/ui/ExprControlCollection.cpp | 18 +++--- src/ui/ExprControlCollection.h | 16 ++--- src/ui/ExprCurve.cpp | 20 +++--- src/ui/ExprCurve.h | 10 +-- src/ui/ExprDeepWater.cpp | 12 ++-- src/ui/ExprDeepWater.h | 8 +-- src/ui/ExprDialog.cpp | 6 +- src/ui/ExprDialog.h | 20 +++--- src/ui/ExprEditor.cpp | 50 +++++++-------- src/ui/ExprEditor.h | 16 ++--- src/ui/ExprFileDialog.cpp | 10 +-- src/ui/ExprFileDialog.h | 16 ++--- src/ui/ExprGrapher2d.cpp | 10 +-- src/ui/ExprGrapher2d.h | 8 +-- src/ui/ExprHighlighter.h | 4 +- src/ui/ExprMain.cpp | 2 +- src/ui/ExprPopupDoc.cpp | 4 +- src/ui/ExprPopupDoc.h | 2 +- src/ui/ExprShortEdit.cpp | 20 +++--- src/ui/ExprShortEdit.h | 6 +- src/ui/SeExpr2Editor.sip | 10 ++- 42 files changed, 338 insertions(+), 273 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9447d3e3..d8ec4d61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,9 +164,27 @@ if (NOT CMAKE_BUILD_TYPE) FORCE) endif() -find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGL) -if (QT4_FOUND) - include_directories(${QT_INCLUDE_DIR}) +if (ENABLE_QT5) + find_package(Qt5 COMPONENTS Core Gui OpenGL) + if (Qt5_FOUND) + message(STATUS "Qt5 Enabled") + message(STATUS "Qt5Core_INCLUDE_DIRS = ${Qt5Core_INCLUDE_DIRS}") + message(STATUS "Qt5Gui_INCLUDE_DIRS = ${Qt5Gui_INCLUDE_DIRS}") + message(STATUS "Qt5OpenGL_INCLUDE_DIRS = ${Qt5OpenGL_INCLUDE_DIRS}") + include_directories(${Qt5Core_INCLUDE_DIRS}) + include_directories(${Qt5Gui_INCLUDE_DIRS}) + include_directories(${Qt5OpenGL_INCLUDE_DIRS}) + endif() +else() + find_package(Qt4 COMPONENTS QtCore QtGui QtOpenGL) + if (QT4_FOUND) + message(STATUS "Qt4 Enabled") + message(STATUS "QT_INCLUDE_DIR = ${QT_INCLUDE_DIR}") + include_directories(${QT_INCLUDE_DIR} + ${QT_INCLUDE_DIR}/QtCore + ${QT_INCLUDE_DIR}/QtGui + ${QT_INCLUDE_DIR}/QtOpenGL) + endif() endif() if (DEFINED ANIMLIB_DIR) diff --git a/src/demos/imageEditor/ImageEditorDialog.h b/src/demos/imageEditor/ImageEditorDialog.h index 1b1ca30f..9eadf720 100644 --- a/src/demos/imageEditor/ImageEditorDialog.h +++ b/src/demos/imageEditor/ImageEditorDialog.h @@ -19,7 +19,7 @@ @file ImageEditorDialog.h */ -#include +#include class QLabel; class ExprEditor; diff --git a/src/demos/imageEditor/imageEditor.cpp b/src/demos/imageEditor/imageEditor.cpp index 67a34d6a..1477fd01 100644 --- a/src/demos/imageEditor/imageEditor.cpp +++ b/src/demos/imageEditor/imageEditor.cpp @@ -23,14 +23,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/src/demos/segraph/segraph.cpp b/src/demos/segraph/segraph.cpp index 7988777e..2640f3d5 100644 --- a/src/demos/segraph/segraph.cpp +++ b/src/demos/segraph/segraph.cpp @@ -14,7 +14,7 @@ * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 */ -#include +#include #include "GraphWindow.h" #include #include diff --git a/src/demos/segraph2/Functions.h b/src/demos/segraph2/Functions.h index 66594881..a25764a2 100644 --- a/src/demos/segraph2/Functions.h +++ b/src/demos/segraph2/Functions.h @@ -16,7 +16,7 @@ */ #ifndef _Functions_h_ #define _Functions_h_ -#include +#include #include #include diff --git a/src/demos/segraph2/Graph.h b/src/demos/segraph2/Graph.h index 8accc085..1c01c38d 100644 --- a/src/demos/segraph2/Graph.h +++ b/src/demos/segraph2/Graph.h @@ -17,10 +17,10 @@ #ifndef _Graph_h_ #define _Graph_h_ -#include -#include -#include -#include +#include +#include +#include +#include #include "Functions.h" #include diff --git a/src/demos/segraph2/GraphWindow.cpp b/src/demos/segraph2/GraphWindow.cpp index e4d85e8d..ed9e449c 100644 --- a/src/demos/segraph2/GraphWindow.cpp +++ b/src/demos/segraph2/GraphWindow.cpp @@ -15,8 +15,8 @@ http://www.apache.org/licenses/LICENSE-2.0 */ #include "GraphWindow.h" -#include -#include +#include +#include GraphWindow::GraphWindow(QWidget* parent) : QFrame(parent), time(0) { //######################################### diff --git a/src/demos/segraph2/GraphWindow.h b/src/demos/segraph2/GraphWindow.h index 5c82b62b..6f5ecc3e 100644 --- a/src/demos/segraph2/GraphWindow.h +++ b/src/demos/segraph2/GraphWindow.h @@ -17,16 +17,16 @@ #ifndef _GraphWindow_h_ #define _GraphWindow_h_ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "Functions.h" #include "Graph.h" diff --git a/src/demos/segraph2/main.cpp b/src/demos/segraph2/main.cpp index 7960e7c4..96630c03 100644 --- a/src/demos/segraph2/main.cpp +++ b/src/demos/segraph2/main.cpp @@ -14,7 +14,7 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -#include +#include #include "GraphWindow.h" #include #include diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt index 9e978c92..674d0664 100644 --- a/src/ui/CMakeLists.txt +++ b/src/ui/CMakeLists.txt @@ -33,10 +33,14 @@ if (EXISTS "/usr/share/apps/cmake/modules") # Needed for some versions of CMake, which only look in version-specific module path list(APPEND CMAKE_MODULE_PATH "/usr/share/apps/cmake/modules") endif() -find_package(PyQt4) -set(PYQT4_SIP ${PYQT4_SIP_DIR}) -if (NOT PYQT4_FOUND) - get_build_info(pyqt4-sip PYQT4_SIP) + +if (NOT DEFINED PYQT_SIP_DIR) + message(FATAL_ERROR "PYQT_SIP_DIR must be defined") +endif() + +if (NOT DEFINED PYQT_SIP_FLAGS) + get_build_info(pyqt-sip-flags PYQT_SIP_FLAGS) + separate_arguments(PYQT_SIP_FLAGS) endif() set(CMAKE_INSTALL_PYTHON "${PYTHON_SITE}/SeExpr2" ) @@ -44,7 +48,7 @@ set(CMAKE_INSTALL_PYTHON "${PYTHON_SITE}/SeExpr2" ) # Other package dependencies... find_package(OpenGL) -if(QT4_FOUND) +if(Qt5_FOUND OR QT4_FOUND) BuildParserScanner(ExprSpecParserLex ExprSpecParser ExprSpec editor_parser_cpp) @@ -63,7 +67,11 @@ if(QT4_FOUND) ExprControlCollection.cpp ExprGrapher2d.cpp ExprBrowser.cpp BasicExpression.cpp ExprDeepWater.cpp) - qt4_wrap_cpp(EDITOR_MOC_SRCS ${EDITOR_MOC_HDRS}) + if (ENABLE_QT5) + qt5_wrap_cpp(EDITOR_MOC_SRCS ${EDITOR_MOC_HDRS}) + else() + qt4_wrap_cpp(EDITOR_MOC_SRCS ${EDITOR_MOC_HDRS}) + endif() if (DEFINED ANIMLIB_DIR) set(CE_MOC_HDRS CE/CECurveListUI.h CE/CEDragHandlers.h CE/CEGraphCurve.h @@ -74,7 +82,11 @@ if(QT4_FOUND) CE/CEGraphKey.cpp CE/CEGraphSeg.cpp CE/CEGraphUI.cpp CE/CEMainUI.cpp CE/CESegEditUI.cpp CE/CETool.cpp) - qt4_wrap_cpp(CE_MOC_SRCS ${CE_MOC_HDRS}) + if (ENABLE_QT5) + qt5_wrap_cpp(CE_MOC_SRCS ${CE_MOC_HDRS}) + else() + qt4_wrap_cpp(CE_MOC_SRCS ${CE_MOC_HDRS}) + endif() endif() if (WIN32) @@ -92,13 +104,22 @@ if(QT4_FOUND) ${editor_parser_cpp}) endif() - include_directories(${QT_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} + include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/CE) target_link_libraries(SeExpr2Editor SeExpr2) - target_link_libraries(SeExpr2Editor ${QT_QTCORE_LIBRARY}) - target_link_libraries(SeExpr2Editor ${QT_QTGUI_LIBRARY}) - target_link_libraries(SeExpr2Editor ${QT_QTOPENGL_LIBRARY}) - target_link_libraries(SeExpr2Editor ${GLUT_LIBRARY} ${OPENGL_LIBRARY}) + + if (ENABLE_QT5) + target_link_libraries(SeExpr2Editor Qt5::Core) + target_link_libraries(SeExpr2Editor Qt5::Gui) + target_link_libraries(SeExpr2Editor Qt5::Widgets) + target_link_libraries(SeExpr2Editor Qt5::OpenGL) + else() + target_link_libraries(SeExpr2Editor ${QT_QTCORE_LIBRARY}) + target_link_libraries(SeExpr2Editor ${QT_QTGUI_LIBRARY}) + target_link_libraries(SeExpr2Editor ${QT_QTOPENGL_LIBRARY}) + endif() + target_link_libraries(SeExpr2Editor ${OPENGL_LIBRARY}) + target_link_libraries(SeExpr2Editor ${GLUT_LIBRARY}) if (DEFINED ANIMLIB_DIR) target_link_libraries(SeExpr2Editor animlib) @@ -128,29 +149,38 @@ if(QT4_FOUND) # Generate python module expreditor2, using sip find_program(SIP_EXEC sip) - set(SIP_QT_TAG -t Qt_4_8_0) set(CMAKE_CXX_FLAGS "-std=c++11") - include_directories(${SIP_INCLUDE_DIR} ${PYQT4_SIP} - ${PYTHON_INCLUDE_DIR} ${QT_INCLUDE_DIR}/QtCore - ${QT_INCLUDE_DIR}/QtGui) + include_directories(${SIP_INCLUDE_DIR} + ${PYQT_SIP_DIR} + ${PYTHON_INCLUDE_DIR}) add_custom_command(OUTPUT sipexpreditor2part0.cpp DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/SeExpr2Editor.sip COMMENT 'Processing SeExpr2Editor.sip' COMMAND ${SIP_EXEC} -w -c . - -x VendorID -x PyQt_NoPrintRangeBug -x Py_v3 - ${SIP_QT_TAG} - -t WS_X11 -g -j 1 - -I. -I${PYQT4_SIP} -I${SIP_INCLUDE_DIR} + ${PYQT_SIP_FLAGS} + -j 1 + -I. -I${PYQT_SIP_DIR} -I${SIP_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/SeExpr2Editor.sip VERBATIM) add_library(expreditor2 SHARED sipexpreditor2part0.cpp) target_link_libraries(expreditor2 SeExpr2Editor ${SEEXPR_LIBRARIES} - ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} - ${QT_QTOPENGL_LIBRARY} ${OPENGL_LIBRARY} - ${GLUT_LIBRARY} ${PYTHON_LIBRARIES}) + ${OPENGL_LIBRARY} ${GLUT_LIBRARY} ${PYTHON_LIBRARIES}) + + if (ENABLE_QT5) + target_link_libraries(expreditor2 SeExpr2Editor + Qt5::Core + Qt5::Gui + Qt5::Widgets + Qt5::OpenGL) + else() + target_link_libraries(expreditor2 SeExpr2Editor + ${QT_QTCORE_LIBRARY} + ${QT_QTGUI_LIBRARY} + ${QT_QTOPENGL_LIBRARY}) + endif() # No prefix on python module name set_target_properties(expreditor2 PROPERTIES PREFIX "") diff --git a/src/ui/EditMain.cpp b/src/ui/EditMain.cpp index 3220ccfc..04969389 100644 --- a/src/ui/EditMain.cpp +++ b/src/ui/EditMain.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include "SeExprEdDialog.h" int main(int argc, char *argv[]) { diff --git a/src/ui/ExprBrowser.cpp b/src/ui/ExprBrowser.cpp index f61288c6..a49dda4e 100644 --- a/src/ui/ExprBrowser.cpp +++ b/src/ui/ExprBrowser.cpp @@ -18,21 +18,22 @@ * @brief Qt browser widget for list of expressions * @author aselle */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include #include "ExprEditor.h" #include "ExprBrowser.h" @@ -133,11 +134,16 @@ class ExprTreeModel : public QAbstractItemModel { ~ExprTreeModel() { delete root; } - void update() { reset(); } + void update() + { + beginResetModel(); + endResetModel(); + } void clear() { + beginResetModel(); root->clear(); - update(); + endResetModel(); } void addPath(const char* label, const char* path) { root->addChild(new ExprTreeItem(root, label, path)); } @@ -193,8 +199,9 @@ class ExprTreeModel : public QAbstractItemModel { QModelIndex find(QString path) { ExprTreeItem* item = root->find(path); if (!item) { + beginResetModel(); root->regen(); - reset(); + endResetModel(); item = root->find(path); } if (item) { @@ -210,7 +217,11 @@ class ExprTreeFilterModel : public QSortFilterProxyModel { public: ExprTreeFilterModel(QWidget* parent = 0) : QSortFilterProxyModel(parent) {} - void update() { reset(); } + void update() + { + beginResetModel(); + endResetModel(); + } bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const { if (sourceParent.isValid() && sourceModel()->data(sourceParent).toString().contains(filterRegExp())) diff --git a/src/ui/ExprBrowser.h b/src/ui/ExprBrowser.h index 97743cac..3c9748e6 100644 --- a/src/ui/ExprBrowser.h +++ b/src/ui/ExprBrowser.h @@ -21,8 +21,8 @@ #ifndef ExprBrowser_h #define ExprBrowser_h -#include -#include +#include +#include #include #include diff --git a/src/ui/ExprColorCurve.cpp b/src/ui/ExprColorCurve.cpp index 4b156699..fad19a99 100644 --- a/src/ui/ExprColorCurve.cpp +++ b/src/ui/ExprColorCurve.cpp @@ -22,16 +22,16 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #ifdef SEEXPR_USE_QDGUI diff --git a/src/ui/ExprColorCurve.h b/src/ui/ExprColorCurve.h index 0213397c..acf89e0e 100644 --- a/src/ui/ExprColorCurve.h +++ b/src/ui/ExprColorCurve.h @@ -24,11 +24,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include diff --git a/src/ui/ExprColorSwatch.cpp b/src/ui/ExprColorSwatch.cpp index c86c7a33..d717eff9 100644 --- a/src/ui/ExprColorSwatch.cpp +++ b/src/ui/ExprColorSwatch.cpp @@ -2,18 +2,18 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #ifdef SEEXPR_USE_QDGUI diff --git a/src/ui/ExprColorSwatch.h b/src/ui/ExprColorSwatch.h index d6f1b4df..cdfe5643 100644 --- a/src/ui/ExprColorSwatch.h +++ b/src/ui/ExprColorSwatch.h @@ -2,10 +2,10 @@ #define _ExprColorSwatch_h_ #include -#include +#include +#include +#include #include -#include -#include class QGridLayout; diff --git a/src/ui/ExprCompletionModel.cpp b/src/ui/ExprCompletionModel.cpp index 8e41791e..a6df8d9b 100644 --- a/src/ui/ExprCompletionModel.cpp +++ b/src/ui/ExprCompletionModel.cpp @@ -18,7 +18,7 @@ * @brief This provides an expression editor for SeExpr syntax with auto ui features * @author aselle */ -#include +#include #include #include #include "ExprCompletionModel.h" diff --git a/src/ui/ExprCompletionModel.h b/src/ui/ExprCompletionModel.h index ab64dc82..88627dce 100644 --- a/src/ui/ExprCompletionModel.h +++ b/src/ui/ExprCompletionModel.h @@ -43,7 +43,7 @@ class ExprCompletionModel : public QAbstractItemModel // ItemModel ExprCompletionModel(QObject* parent = 0); - QModelIndex index(int row, int column, const QModelIndex&) const { return createIndex(row, column, 0); } + QModelIndex index(int row, int column, const QModelIndex&) const { return createIndex(row, column, nullptr); } QModelIndex parent(const QModelIndex&) const { return QModelIndex(); } diff --git a/src/ui/ExprControl.cpp b/src/ui/ExprControl.cpp index 72c7bc82..8ae8d50e 100644 --- a/src/ui/ExprControl.cpp +++ b/src/ui/ExprControl.cpp @@ -18,32 +18,32 @@ * @brief UI control widgets for expressions. * @author aselle */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "ExprControl.h" #include "ExprColorCurve.h" diff --git a/src/ui/ExprControl.h b/src/ui/ExprControl.h index 330ed25f..fea710d9 100644 --- a/src/ui/ExprControl.h +++ b/src/ui/ExprControl.h @@ -16,14 +16,14 @@ */ #ifndef _ExprControl_h_ #define _ExprControl_h_ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "ExprCurve.h" #include "ExprColorCurve.h" diff --git a/src/ui/ExprControlCollection.cpp b/src/ui/ExprControlCollection.cpp index c1790ac3..03ff4acc 100644 --- a/src/ui/ExprControlCollection.cpp +++ b/src/ui/ExprControlCollection.cpp @@ -18,15 +18,15 @@ * @brief Manages/creates a bunch of ExprControls by using expression text * @author aselle */ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "ExprEditor.h" #include "ExprHighlighter.h" #include "ExprCompletionModel.h" diff --git a/src/ui/ExprControlCollection.h b/src/ui/ExprControlCollection.h index 8fb68338..95274da8 100644 --- a/src/ui/ExprControlCollection.h +++ b/src/ui/ExprControlCollection.h @@ -22,14 +22,14 @@ #define _ExprControlCollection_h #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "ExprControl.h" class QVBoxLayout; diff --git a/src/ui/ExprCurve.cpp b/src/ui/ExprCurve.cpp index cd70c6f5..85ebbaf3 100644 --- a/src/ui/ExprCurve.cpp +++ b/src/ui/ExprCurve.cpp @@ -22,16 +22,16 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/src/ui/ExprCurve.h b/src/ui/ExprCurve.h index 8888b6b1..20c92f9a 100644 --- a/src/ui/ExprCurve.h +++ b/src/ui/ExprCurve.h @@ -24,11 +24,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include diff --git a/src/ui/ExprDeepWater.cpp b/src/ui/ExprDeepWater.cpp index ab35e7c7..fa862d3c 100644 --- a/src/ui/ExprDeepWater.cpp +++ b/src/ui/ExprDeepWater.cpp @@ -19,12 +19,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/src/ui/ExprDeepWater.h b/src/ui/ExprDeepWater.h index e19611bb..9cd5122c 100644 --- a/src/ui/ExprDeepWater.h +++ b/src/ui/ExprDeepWater.h @@ -20,10 +20,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/src/ui/ExprDialog.cpp b/src/ui/ExprDialog.cpp index ae951567..9d2068f7 100644 --- a/src/ui/ExprDialog.cpp +++ b/src/ui/ExprDialog.cpp @@ -24,9 +24,9 @@ #include "ExprDialog.h" #include "ExprControlCollection.h" -#include -#include -#include +#include +#include +#include #include #include diff --git a/src/ui/ExprDialog.h b/src/ui/ExprDialog.h index 217b9f9b..dd83d339 100644 --- a/src/ui/ExprDialog.h +++ b/src/ui/ExprDialog.h @@ -21,16 +21,16 @@ #ifndef _MY_EXPR_EDITOR_H #define _MY_EXPR_EDITOR_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/src/ui/ExprEditor.cpp b/src/ui/ExprEditor.cpp index ecba7a86..7f962f52 100644 --- a/src/ui/ExprEditor.cpp +++ b/src/ui/ExprEditor.cpp @@ -18,31 +18,31 @@ * @brief This provides an expression editor for SeExpr syntax with auto ui features * @author aselle */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/src/ui/ExprEditor.h b/src/ui/ExprEditor.h index ce6d386b..cf10d082 100644 --- a/src/ui/ExprEditor.h +++ b/src/ui/ExprEditor.h @@ -23,14 +23,14 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include class QLabel; class QPushButton; diff --git a/src/ui/ExprFileDialog.cpp b/src/ui/ExprFileDialog.cpp index 8f50b316..b60ffa61 100644 --- a/src/ui/ExprFileDialog.cpp +++ b/src/ui/ExprFileDialog.cpp @@ -19,11 +19,11 @@ #include "ExprFileDialog.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include using std::max; diff --git a/src/ui/ExprFileDialog.h b/src/ui/ExprFileDialog.h index 53fde490..cf492703 100644 --- a/src/ui/ExprFileDialog.h +++ b/src/ui/ExprFileDialog.h @@ -20,14 +20,14 @@ #ifndef EXPRFILEDIALOG_H #define EXPRFILEDIALOG_H -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include class ExprPreviewWidget : public QWidget { public: diff --git a/src/ui/ExprGrapher2d.cpp b/src/ui/ExprGrapher2d.cpp index c91c81e1..c0ea1f59 100644 --- a/src/ui/ExprGrapher2d.cpp +++ b/src/ui/ExprGrapher2d.cpp @@ -20,11 +20,11 @@ */ #include "ExprGrapher2d.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include ExprGrapherWidget::ExprGrapherWidget(QWidget* parent, int width, int height) : view(new ExprGrapherView(*this, this, width, height)), expr("", SeExpr2::ExprType().FP(1)) { diff --git a/src/ui/ExprGrapher2d.h b/src/ui/ExprGrapher2d.h index 2e7dd579..38f04457 100644 --- a/src/ui/ExprGrapher2d.h +++ b/src/ui/ExprGrapher2d.h @@ -21,10 +21,10 @@ #ifndef ExprGrapher2d_h #define ExprGrapher2d_h -#include -#include -#include -#include +#include +#include +#include +#include #include "BasicExpression.h" diff --git a/src/ui/ExprHighlighter.h b/src/ui/ExprHighlighter.h index 6eb928e2..f055dd51 100644 --- a/src/ui/ExprHighlighter.h +++ b/src/ui/ExprHighlighter.h @@ -20,8 +20,8 @@ */ #ifndef _ExprHighlighter_h_ #define _ExprHighlighter_h_ -#include -#include +#include +#include #include class ExprHighlighter : public QSyntaxHighlighter { diff --git a/src/ui/ExprMain.cpp b/src/ui/ExprMain.cpp index aacf4ef2..b3050a1d 100644 --- a/src/ui/ExprMain.cpp +++ b/src/ui/ExprMain.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include "ExprDialog.h" int main(int argc, char *argv[]) { diff --git a/src/ui/ExprPopupDoc.cpp b/src/ui/ExprPopupDoc.cpp index c3cebf22..9a285836 100644 --- a/src/ui/ExprPopupDoc.cpp +++ b/src/ui/ExprPopupDoc.cpp @@ -15,8 +15,8 @@ * http://www.apache.org/licenses/LICENSE-2.0 */ #include "ExprPopupDoc.h" -#include -#include +#include +#include ExprPopupDoc::ExprPopupDoc(QWidget* parent, const QPoint& placecr, const QString& msg) { Q_UNUSED(parent); diff --git a/src/ui/ExprPopupDoc.h b/src/ui/ExprPopupDoc.h index 985e9af5..63328283 100644 --- a/src/ui/ExprPopupDoc.h +++ b/src/ui/ExprPopupDoc.h @@ -17,7 +17,7 @@ #ifndef _ExprPopupDoc_h_ #define _ExprPopupDoc_h -#include +#include class QLabel; class ExprPopupDoc : public QWidget { diff --git a/src/ui/ExprShortEdit.cpp b/src/ui/ExprShortEdit.cpp index e23d08ca..c81a375a 100644 --- a/src/ui/ExprShortEdit.cpp +++ b/src/ui/ExprShortEdit.cpp @@ -18,16 +18,16 @@ * @brief This provides an expression editor for SeExpr syntax with auto ui features * @author aselle */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "ExprShortEdit.h" #include "ExprDialog.h" diff --git a/src/ui/ExprShortEdit.h b/src/ui/ExprShortEdit.h index 84327191..71ee1019 100644 --- a/src/ui/ExprShortEdit.h +++ b/src/ui/ExprShortEdit.h @@ -25,9 +25,9 @@ #include #include -#include -#include -#include +#include +#include +#include class ExprControlCollection; class QToolButton; diff --git a/src/ui/SeExpr2Editor.sip b/src/ui/SeExpr2Editor.sip index d9780584..d73b8992 100644 --- a/src/ui/SeExpr2Editor.sip +++ b/src/ui/SeExpr2Editor.sip @@ -2,6 +2,14 @@ %Module expreditor2 +%Import QtCore/QtCoremod.sip + +%If (Qt_5_0_0 -) +%Import QtWidgets/QtWidgetsmod.sip +%End + +%Import QtGui/QtGuimod.sip + %MappedType std::string { %TypeHeaderCode @@ -60,8 +68,6 @@ %End }; -%Import QtGui/QtGuimod.sip - class ExprDialog:QDialog{ %TypeHeaderCode #include "ExprDialog.h" From 87401f31e71a19dec11f0fec90db99db6af44d4a Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Tue, 8 Nov 2016 19:05:54 -0800 Subject: [PATCH 06/16] Makefile.config.example: update flags for Qt4 and Qt5 compatibility --- Makefile.config.example | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile.config.example b/Makefile.config.example index 0874c69f..56250ef2 100644 --- a/Makefile.config.example +++ b/Makefile.config.example @@ -37,6 +37,17 @@ ifeq ($(uname_S),Linux) EXTRA_CMAKE_ARGS += -DQDGUI_DIR=$(RP_qdgui) endif + ifdef RP_qt5 + EXTRA_CMAKE_ARGS += -DENABLE_QT5=true + endif + + ifdef RP_pyqt5 + EXTRA_CMAKE_ARGS += -DPYQT_SIP_DIR=$(RP_pyqt5)/share/sip/PyQt5 + endif + + ifdef RP_pyqt4 + EXTRA_CMAKE_ARGS += -DPYQT_SIP_DIR=$(RP_pyqt4)/share/sip + endif endif From 27659a5cfa12c73e0cd7654d96b5584414c78740 Mon Sep 17 00:00:00 2001 From: Janet Berlin Date: Wed, 12 Apr 2017 15:30:37 -0700 Subject: [PATCH 07/16] fixes SEEXPR-195: crash during code gen of Vec4d func --- src/SeExpr/ExprLLVMCodeGeneration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SeExpr/ExprLLVMCodeGeneration.cpp b/src/SeExpr/ExprLLVMCodeGeneration.cpp index 5c5215fd..3f1532c1 100644 --- a/src/SeExpr/ExprLLVMCodeGeneration.cpp +++ b/src/SeExpr/ExprLLVMCodeGeneration.cpp @@ -1070,7 +1070,7 @@ struct VarCodeGeneration { varRef->type().isLifetimeUniform() ? baseMemory : Builder.CreateInBoundsGEP(baseMemory, indirectIndex); return Builder.CreateLoad(variablePointer); } else { - std::vector loadedValues(3); + std::vector loadedValues(dim); for (int component = 0; component < dim; component++) { Value *componentIndex = ConstantInt::get(Type::getInt32Ty(llvmContext), component); /// If we are uniform always assume indirectIndex is 0 (there's only one value) From c7478f850ddfb8aca7fe455861a544d88a88f494 Mon Sep 17 00:00:00 2001 From: Janet Berlin Date: Thu, 6 Apr 2017 18:10:24 -0700 Subject: [PATCH 08/16] remove old v1 code for plugin init --- src/SeExpr/ExprFunc.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/SeExpr/ExprFunc.cpp b/src/SeExpr/ExprFunc.cpp index 0b0f1ace..aefab99e 100644 --- a/src/SeExpr/ExprFunc.cpp +++ b/src/SeExpr/ExprFunc.cpp @@ -146,7 +146,7 @@ void ExprFunc::initInternal() { if (Functions) return; Functions = new FuncTable; SeExpr2::defineBuiltins(defineInternal, defineInternal3); - const char* path = getenv("SE_EXPR_PLUGINS"); + const char* path = getenv("SE_EXPR2_PLUGINS"); if (path) loadPlugins(path); } @@ -258,15 +258,11 @@ void ExprFunc::loadPlugin(const char* path) { if (init_v3) init_v3(defineInternal3); else { - void* init_v2 = dlsym(handle, "SeExprPluginInitV2"); - void* init_v1 = dlsym(handle, "SeExprPluginInit"); - if (!init_v1 && !init_v2) { - std::cerr << "Error reading expression plugin: " << path << std::endl; - std::cerr << "No functions named SeExprPluginInit and SeExprPluginInitV2 called" << std::endl; - } - dlclose(handle); - return; + std::cerr << "Error reading expression plugin: " << path << std::endl; + std::cerr << "No function named SeExpr2PluginInit defined" << std::endl; } + dlclose(handle); + return; #endif } } From cee34095f31d32724efa9e99b4bb2e8754e1c9ca Mon Sep 17 00:00:00 2001 From: Janet Berlin Date: Fri, 14 Apr 2017 17:13:08 -0700 Subject: [PATCH 09/16] delay dclose() of plugins until function table is cleared --- src/SeExpr/ExprFunc.cpp | 16 +++++++++++++--- src/SeExpr/ExprFunc.h | 1 + 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/SeExpr/ExprFunc.cpp b/src/SeExpr/ExprFunc.cpp index aefab99e..35a73755 100644 --- a/src/SeExpr/ExprFunc.cpp +++ b/src/SeExpr/ExprFunc.cpp @@ -105,6 +105,8 @@ FuncTable* Functions = 0; namespace SeExpr2 { +std::vector ExprFunc::dynlib; + static SeExprInternal2::Mutex mutex; void ExprFunc::init() { @@ -116,6 +118,13 @@ void ExprFunc::cleanup() { SeExprInternal2::AutoMutex locker(mutex); delete Functions; Functions = nullptr; +#ifdef SEEXPR_WIN32 +#else + for(size_t i=0; i dynlib; }; } From 02b797ad88439a9fac629ad019820f5ea4ce6352 Mon Sep 17 00:00:00 2001 From: Janet Berlin Date: Thu, 20 Apr 2017 17:54:32 -0700 Subject: [PATCH 10/16] Function cJitter has no definition --- src/SeExpr/ExprFunc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SeExpr/ExprFunc.cpp b/src/SeExpr/ExprFunc.cpp index 35a73755..3e03ce95 100644 --- a/src/SeExpr/ExprFunc.cpp +++ b/src/SeExpr/ExprFunc.cpp @@ -155,7 +155,7 @@ void ExprFunc::initInternal() { if (Functions) return; Functions = new FuncTable; SeExpr2::defineBuiltins(defineInternal, defineInternal3); - const char* path = getenv("SE_EXPR2_PLUGINS"); + const char* path = getenv("SE_EXPR_PLUGINS"); if (path) loadPlugins(path); } From 65bd6c452a3530a3f92644061a0843f2a5762512 Mon Sep 17 00:00:00 2001 From: Janet Berlin Date: Fri, 28 Apr 2017 13:24:58 -0700 Subject: [PATCH 11/16] fixes undefined signals due to namespace typo --- src/ui/ExprColorCurve.cpp | 8 ++++---- src/ui/ExprColorCurve.h | 20 +++++++++----------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/ui/ExprColorCurve.cpp b/src/ui/ExprColorCurve.cpp index fad19a99..5be7a0af 100644 --- a/src/ui/ExprColorCurve.cpp +++ b/src/ui/ExprColorCurve.cpp @@ -445,9 +445,9 @@ ExprColorCurve::ExprColorCurve(QWidget *parent, QString pLabel, QString vLabel, // when a user selects a cv, update the fields on left connect(_scene, - SIGNAL(cvSelected(double, SeExpr2::SeExpr2::Vec3d, T_INTERP)), + SIGNAL(cvSelected(double, SeExpr2::Vec3d, T_INTERP)), this, - SLOT(cvSelectedSlot(double, SeExpr2::SeExpr2::Vec3d, T_INTERP))); + SLOT(cvSelectedSlot(double, SeExpr2::Vec3d, T_INTERP))); // when a user selects a different interp, the curve has to redraw connect(_interpComboBox, SIGNAL(activated(int)), _scene, SLOT(interpChanged(int))); // when a user types a different position, the curve has to redraw @@ -455,9 +455,9 @@ ExprColorCurve::ExprColorCurve(QWidget *parent, QString pLabel, QString vLabel, connect(this, SIGNAL(selPosChangedSignal(double)), _scene, SLOT(selPosChanged(double))); // when a user selects a different color, the ramp has to redraw connect(_selValEdit, - SIGNAL(selValChangedSignal(SeExpr2::SeExpr2::Vec3d)), + SIGNAL(selValChangedSignal(SeExpr2::Vec3d)), _scene, - SLOT(selValChanged(SeExpr2::SeExpr2::Vec3d))); + SLOT(selValChanged(SeExpr2::Vec3d))); connect(_selValEdit, SIGNAL(swatchChanged(QColor)), this, SLOT(internalSwatchChanged(QColor))); // when the widget is resized, resize the curve widget connect(curveView, SIGNAL(resizeSignal(int, int)), _scene, SLOT(resize(int, int))); diff --git a/src/ui/ExprColorCurve.h b/src/ui/ExprColorCurve.h index acf89e0e..9ffd2c2e 100644 --- a/src/ui/ExprColorCurve.h +++ b/src/ui/ExprColorCurve.h @@ -72,20 +72,19 @@ class CCurveScene : public QGraphicsScene { friend class ExprColorCurve; - private: - T_CURVE *_curve; - public -slots: + public slots: void interpChanged(const int interp); void selPosChanged(double pos); void selValChanged(const SeExpr2::Vec3d &val); void resize(const int width, const int height); -signals: + signals: void cvSelected(double x, const SeExpr2::Vec3d y, const T_INTERP interp); void curveChanged(); private: + T_CURVE *_curve; + QByteArray getCPixmap(); int _width; @@ -157,20 +156,19 @@ class ExprColorCurve : public QWidget { CCurveScene *_scene; - public -slots: + public slots: void cvSelectedSlot(const double pos, const SeExpr2::Vec3d val, const T_INTERP interp); void selPosChanged(); void openDetail(); - private -slots: - void internalSwatchChanged(QColor color); -signals: + signals: void selPosChangedSignal(double pos); void selValChangedSignal(SeExpr2::Vec3d val); void swatchChanged(QColor color); + private slots: + void internalSwatchChanged(QColor color); + private: QLineEdit *_selPosEdit; ExprCSwatchFrame *_selValEdit; From 493b8165812b49c75113f05913647d79b4d4a177 Mon Sep 17 00:00:00 2001 From: Janet Berlin Date: Sun, 30 Apr 2017 18:22:52 -0700 Subject: [PATCH 12/16] fixes for build dependencies among ui, tests and demos --- CMakeLists.txt | 4 +-- src/demos/imageEditor/CMakeLists.txt | 4 ++- src/demos/imageEditor/imageEditor.cpp | 8 ++--- src/tests/CMakeLists.txt | 45 ++++++++++++++------------- src/ui/CMakeLists.txt | 3 ++ 5 files changed, 36 insertions(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d8ec4d61..723e0c8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -226,13 +226,13 @@ set(SEEXPR_EDITOR_LIBRARIES SeExpr2Editor) include_directories(BEFORE ${CMAKE_BINARY_DIR}/include) include_directories(BEFORE ${CMAKE_BINARY_DIR}/src/SeExpr) include_directories(BEFORE ${CMAKE_SOURCE_DIR}/src/SeExpr) -include_directories(BEFORE ${CMAKE_SOURCE_DIR}/src/EditorUI) +include_directories(BEFORE ${CMAKE_SOURCE_DIR}/src/ui) ## Traverse subdirectories add_subdirectory(src/SeExpr) add_subdirectory(src/ui) -add_subdirectory(src/tests) add_subdirectory(src/py) add_subdirectory(src/utils) add_subdirectory(src/demos) add_subdirectory(src/doc) +add_subdirectory(src/tests) diff --git a/src/demos/imageEditor/CMakeLists.txt b/src/demos/imageEditor/CMakeLists.txt index dc22d751..51fb4c00 100644 --- a/src/demos/imageEditor/CMakeLists.txt +++ b/src/demos/imageEditor/CMakeLists.txt @@ -20,7 +20,8 @@ add_definitions(-DIMAGE_EDITOR_ROOT="${CMAKE_INSTALL_PREFIX}") find_package(Qt4 COMPONENTS QtCore QtGui) find_package(PNG) -if (QT4_FOUND AND PNG_FOUND) +if(Qt5_FOUND OR QT4_FOUND) +if(PNG_FOUND) set(imageEditor_MOC_HDRS ImageEditorDialog.h) set(imageEditor_CPPS imageEditor.cpp) qt4_wrap_cpp(imageEditor_MOC_SRCS ${imageEditor_MOC_HDRS}) @@ -37,6 +38,7 @@ if (QT4_FOUND AND PNG_FOUND) target_link_libraries(imageEditor2 ${PNG_LIBRARIES}) install(TARGETS imageEditor2 DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() +endif() install(FILES fbm.se noisecolor1.se noisecolor2.se noise.se raytrace.se sinc.se DESTINATION share/SeExpr2/expressions) diff --git a/src/demos/imageEditor/imageEditor.cpp b/src/demos/imageEditor/imageEditor.cpp index 1477fd01..bc7875d6 100644 --- a/src/demos/imageEditor/imageEditor.cpp +++ b/src/demos/imageEditor/imageEditor.cpp @@ -32,10 +32,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "ImageEditorDialog.h" diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 024f1879..627ea982 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -30,35 +30,38 @@ if(EXISTS ${GTEST_DIR}/include) endif() if (PNG_FOUND) + message("-- Found PNG library: " ${PNG_LIBRARIES}) + include_directories(SYSTEM ${PNG_INCLUDE_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - endif() - if(PNG_FOUND) - message("-- Found PNG library: " ${PNG_LIBRARIES}) - - # generate test cases for dev example expressions - add_custom_command( - SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/../demos/imageSynth/examples - COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/genImageTestFile.py" - ARGS "${CMAKE_CURRENT_SOURCE_DIR}/../demos/imageSynth/examples" "testSeExprExamples.cpp" - OUTPUT testSeExprExamples.cpp - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/genImageTestFile.py - ${CMAKE_CURRENT_SOURCE_DIR}/../demos/imageSynth/examples) + # generate test cases for example developer expressions + set (GENERATE_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/genImageTestFile.py") + set (EXAMPLE_DIR ${CMAKE_INSTALL_PREFIX}/share/SeExpr2/demos/imageSynth/examples) + if (EXISTS ${EXAMPLE_DIR}) + set (EXAMPLE_TESTS "testSeExprExamples.cpp") + add_custom_command( + SOURCE ${EXAMPLE_DIR} + COMMAND ${GENERATE_SCRIPT} + ARGS "${EXAMPLE_DIR}" "${EXAMPLE_TESTS}" + OUTPUT ${EXAMPLE_TESTS} + DEPENDS ${GENERATE_SCRIPT} ${EXAMPLE_DIR}) + endif() # generate test cases for paint3d show examples - if (EXISTS /disney/shows/default/rel/global/expressions) - set (PAINT3D_SRC "testPaint3dExamples.cpp") + set (PAINT3D_DIR /disney/shows/default/rel/global/expressions) + if (EXISTS ${PAINT3D_DIR}) + set (PAINT3D_TESTS "testPaint3dExamples.cpp") add_custom_command( - SOURCE /disney/shows/default/rel/global/expressions - COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/genImageTestFile.py" - ARGS "/disney/shows/default/rel/global/expressions" "testPaint3dExamples.cpp" - OUTPUT testPaint3dExamples.cpp - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/genImageTestFile.py - /disney/shows/default/rel/global/expressions) + SOURCE ${PAINT3D_DIR} + COMMAND ${GENERATE_SCRIPT} + ARGS "${PAINT3D_DIR}" "${PAINT3D_TESTS}" + OUTPUT ${PAINT3D_TESTS} + DEPENDS ${GENERATE_SCRIPT} ${PAINT3D_DIR}) endif() - add_executable(testmain2 "testmain.cpp" "imageTests.cpp" "testSeExprExamples.cpp" ${PAINT3D_SRC} "basic.cpp" "string.cpp") + add_executable(testmain2 "testmain.cpp" "imageTests.cpp" ${EXAMPLE_TESTS} ${PAINT3D_TESTS} "basic.cpp" "string.cpp") + add_dependencies(testmain2 imageSynth2) target_link_libraries(testmain2 SeExpr2 gtest ${PNG_LIBRARIES}) install(TARGETS testmain2 DESTINATION share/test/SeExpr2) install(PROGRAMS imagediff.py DESTINATION share/test/SeExpr2) diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt index 674d0664..cb5e6c2c 100644 --- a/src/ui/CMakeLists.txt +++ b/src/ui/CMakeLists.txt @@ -141,7 +141,10 @@ if(Qt5_FOUND OR QT4_FOUND) target_link_libraries(SeExpr2Editor opengl32) endif() + ## Install library and includes install(TARGETS SeExpr2Editor DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION include/SeExpr2/UI + FILES_MATCHING PATTERN "*.h") # Setup header files file(GLOB public_includes "*.h") From de2463eb15e2f96ecac62341502cd3982d5e6fb7 Mon Sep 17 00:00:00 2001 From: Janet Berlin Date: Mon, 12 Jun 2017 14:11:00 -0700 Subject: [PATCH 13/16] build demo apps for qt5 env --- src/demos/imageEditor/CMakeLists.txt | 28 +++++++++++++++++-- src/demos/segraph2/CMakeLists.txt | 42 ++++++++++++++++++++++------ 2 files changed, 60 insertions(+), 10 deletions(-) diff --git a/src/demos/imageEditor/CMakeLists.txt b/src/demos/imageEditor/CMakeLists.txt index 51fb4c00..d0cecfad 100644 --- a/src/demos/imageEditor/CMakeLists.txt +++ b/src/demos/imageEditor/CMakeLists.txt @@ -17,20 +17,44 @@ # Set application root dir for use inside the source code. add_definitions(-DIMAGE_EDITOR_ROOT="${CMAKE_INSTALL_PREFIX}") -find_package(Qt4 COMPONENTS QtCore QtGui) +if (ENABLE_QT5) + find_package(Qt5 COMPONENTS Core Gui Widgets) # find and setup Qt5 for this project + include_directories(${Qt5Core_INCLUDE_DIRS} + ${Qt5Gui_INCLUDE_DIRS} + ${Qt5OpenGL_INCLUDE_DIRS}) +else() + find_package(Qt4 COMPONENTS QtCore QtGui) + include_directories(${QT_INCLUDE_DIR} + ${QT_INCLUDE_DIR}/QtCore + ${QT_INCLUDE_DIR}/QtGui) +endif() + find_package(PNG) if(Qt5_FOUND OR QT4_FOUND) if(PNG_FOUND) set(imageEditor_MOC_HDRS ImageEditorDialog.h) set(imageEditor_CPPS imageEditor.cpp) + +if (ENABLE_QT5) + qt5_wrap_cpp(imageEditor_MOC_SRCS ${imageEditor_MOC_HDRS}) +else() qt4_wrap_cpp(imageEditor_MOC_SRCS ${imageEditor_MOC_HDRS}) +endif() add_executable(imageEditor2 ${imageEditor_CPPS} ${imageEditor_MOC_SRCS}) - include_directories(${QT_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${SEEXPR_EDITOR_INCLUDES}) + +if (ENABLE_QT5) + target_link_libraries(imageEditor2 Qt5::Core) + target_link_libraries(imageEditor2 Qt5::Gui) + target_link_libraries(imageEditor2 Qt5::Widgets) +else() target_link_libraries(imageEditor2 ${QT_QTCORE_LIBRARY}) target_link_libraries(imageEditor2 ${QT_QTGUI_LIBRARY}) +endif() + target_link_libraries(imageEditor2 ${SEEXPR_LIBRARIES}) target_link_libraries(imageEditor2 ${SEEXPR_EDITOR_LIBRARIES}) diff --git a/src/demos/segraph2/CMakeLists.txt b/src/demos/segraph2/CMakeLists.txt index b8fb3495..e7e6fa73 100644 --- a/src/demos/segraph2/CMakeLists.txt +++ b/src/demos/segraph2/CMakeLists.txt @@ -13,13 +13,39 @@ # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 -set(segraph_MOC_HDRS Graph.h GraphWindow.h Functions.h) -set(segraph_CPPS main.cpp Graph.cpp GraphWindow.cpp Functions.cpp) -qt4_wrap_cpp(segraph_MOC_SRCS ${segraph_MOC_HDRS}) +if (ENABLE_QT5) + find_package(Qt5 COMPONENTS Core Gui Widgets) # find and setup Qt5 for this project + include_directories(${Qt5Core_INCLUDE_DIRS} + ${Qt5Gui_INCLUDE_DIRS} + ${Qt5OpenGL_INCLUDE_DIRS}) +else() + find_package(Qt4 COMPONENTS QtCore QtGui) + include_directories(${QT_INCLUDE_DIR} + ${QT_INCLUDE_DIR}/QtCore + ${QT_INCLUDE_DIR}/QtGui) +endif() -add_executable(segraph2 ${segraph_CPPS} ${segraph_MOC_SRCS}) -install(TARGETS segraph2 DESTINATION demo) +if(Qt5_FOUND OR QT4_FOUND) + set(segraph_MOC_HDRS Graph.h GraphWindow.h Functions.h) + set(segraph_CPPS main.cpp Graph.cpp GraphWindow.cpp Functions.cpp) -target_link_libraries(segraph2 ${QT_QTCORE_LIBRARY}) -target_link_libraries(segraph2 ${QT_QTGUI_LIBRARY}) -target_link_libraries(segraph2 ${SEEXPR_LIBRARIES}) +if (ENABLE_QT5) + qt5_wrap_cpp(segraph_MOC_SRCS ${segraph_MOC_HDRS}) +else() + qt4_wrap_cpp(segraph_MOC_SRCS ${segraph_MOC_HDRS}) +endif() + + add_executable(segraph2 ${segraph_CPPS} ${segraph_MOC_SRCS}) + install(TARGETS segraph2 DESTINATION demo) + +if (ENABLE_QT5) + target_link_libraries(segraph Qt5::Core) + target_link_libraries(segraph Qt5::Gui) + target_link_libraries(segraph Qt5::Widgets) +else() + target_link_libraries(segraph2 ${QT_QTCORE_LIBRARY}) + target_link_libraries(segraph2 ${QT_QTGUI_LIBRARY}) +endif() + + target_link_libraries(segraph2 ${SEEXPR_LIBRARIES}) +endif() From 33d0cb5a8190e5c1d0c7b5d2935b4b61d0132b90 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Tue, 13 Jun 2017 14:03:24 -0700 Subject: [PATCH 14/16] build: allow gtest to be collected --- Makefile.config.example | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.config.example b/Makefile.config.example index 56250ef2..e8f57486 100644 --- a/Makefile.config.example +++ b/Makefile.config.example @@ -5,7 +5,11 @@ uname_S := $(shell uname -s) # Example Linux config ifeq ($(uname_S),Linux) - EXTRA_CMAKE_ARGS += -DGTEST_DIR=/usr + ifdef RP_gtest + EXTRA_CMAKE_ARGS += -DGTEST_DIR=$(RP_gtest) + else + EXTRA_CMAKE_ARGS += -DGTEST_DIR=/usr + endif ifdef RP_animlib EXTRA_CMAKE_ARGS += -DANIMLIB_DIR=$(RP_animlib) From 24b43614ae50b4c4582866f8bc5b9ee7421b4201 Mon Sep 17 00:00:00 2001 From: Janet Berlin Date: Tue, 25 Jul 2017 16:46:44 -0700 Subject: [PATCH 15/16] minor documentation fixes --- src/doc/userdoc.txt | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/doc/userdoc.txt b/src/doc/userdoc.txt index 542f5727..4079889f 100644 --- a/src/doc/userdoc.txt +++ b/src/doc/userdoc.txt @@ -350,26 +350,6 @@ other values (3-10)
  • pick ( value, 10, 20, 1, 1, 0 ) - values 10, 11, and 13 through 20 will be returned (12 is skipped due to zero weight)
  • -Note: the filename for the map and -projmap functions can specify an optional format-arg which will be -inserted into the filename as indicated in the examples below:
    -
      -
    • map( 'noise.%d.map.tx', 10 )   references a file named -'noise.10.map.tx'
      -
    • -
    • map( 'fenceColor-%04d.tx', 12 )    references -a file named -'fenceColor-0012.tx'
    • -
    • map( 'map-%d.tx', $objectId)   builds the filename -based on the object Id
    • -
    • map( 'map-%d.tx', cycle($objectId, 10, 20))   cycles -through maps 10 through 20 based on -object Id
    • -
    • map( 'map-%d.tx', pick($objectId, 10, 20))   picks maps -10 through 20 randomly based on -object Id
      -
    • -

    General Math Functions and Constants
    From 8ef62bb05ddc0439b006d4e3447967ba9aa05a73 Mon Sep 17 00:00:00 2001 From: Janet Berlin Date: Thu, 25 Jan 2018 10:17:01 -0800 Subject: [PATCH 16/16] fix build errors for boost/python and able to build w/o animlib --- CMakeLists.txt | 2 +- Makefile.config.example | 6 +++++- src/py/CMakeLists.txt | 4 +++- src/ui/CMakeLists.txt | 21 +++++++++++++-------- 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 723e0c8c..8b864df9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,7 +88,7 @@ set(LLVM_LIB "") if (ENABLE_LLVM_BACKEND) set(LLVM_DIR /usr/share/llvm/cmake CACHE PATH "Where to search for LLVM i.e. ") - find_package(LLVM CONFIG NAMES LLVM CONFIGS LLVMConfig.cmake) + find_package(LLVM CONFIG NAMES LLVM CONFIGS LLVM-Config.cmake LLVMConfig.cmake) if (LLVM_FOUND) set(SEEXPR_ENABLE_LLVM_BACKEND 1) message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") diff --git a/Makefile.config.example b/Makefile.config.example index e8f57486..1826d287 100644 --- a/Makefile.config.example +++ b/Makefile.config.example @@ -11,9 +11,13 @@ ifeq ($(uname_S),Linux) EXTRA_CMAKE_ARGS += -DGTEST_DIR=/usr endif - ifdef RP_animlib + # only build animlib if soure directory exists and env var set + CE_dir = $(wildcard "src/ui/CE") + ifneq ("$(CE_dir)", "") + ifdef RP_animlib EXTRA_CMAKE_ARGS += -DANIMLIB_DIR=$(RP_animlib) endif + endif ifdef RP_boost_disney EXTRA_CMAKE_ARGS += -DBOOST_DIR=$(RP_boost_disney) diff --git a/src/py/CMakeLists.txt b/src/py/CMakeLists.txt index a3552f9c..27caaddc 100644 --- a/src/py/CMakeLists.txt +++ b/src/py/CMakeLists.txt @@ -75,12 +75,14 @@ if (USE_PYTHON) if (NOT DEFINED BOOST_INCLUDE_DIR) set(BOOST_INCLUDE_DIR ${BOOST_DIR}/include) endif() - include_directories(SYSTEM ${BOOST_INCLUDE_DIR}) + include_directories(SYSTEM ${BOOST_INCLUDE_DIR} ${PYTHON_INCLUDE_DIR}) + message(STATUS "BOOST_INCLUDE_DIR = ${BOOST_INCLUDE_DIR}") if (NOT DEFINED BOOST_LIB_DIR) set(BOOST_LIB_DIR ${BOOST_DIR}/${CMAKE_INSTALL_LIBDIR}) endif() link_directories(${BOOST_LIB_DIR}) + message(STATUS "BOOST_LIB_DIR = ${BOOST_LIB_DIR}") include_directories(../SeExpr/parser) add_library(core SHARED SeExprPy.cpp ../SeExpr/parser/SeExprParse.cpp ../SeExpr/parser/SeExprLex.cpp) diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt index cb5e6c2c..7e53cd88 100644 --- a/src/ui/CMakeLists.txt +++ b/src/ui/CMakeLists.txt @@ -34,15 +34,18 @@ if (EXISTS "/usr/share/apps/cmake/modules") list(APPEND CMAKE_MODULE_PATH "/usr/share/apps/cmake/modules") endif() -if (NOT DEFINED PYQT_SIP_DIR) - message(FATAL_ERROR "PYQT_SIP_DIR must be defined") -endif() - if (NOT DEFINED PYQT_SIP_FLAGS) get_build_info(pyqt-sip-flags PYQT_SIP_FLAGS) separate_arguments(PYQT_SIP_FLAGS) endif() +if (NOT DEFINED PYQT_SIP_DIR) + get_build_info(pyqt4-sip PYQT_SIP_DIR) + if (NOT DEFINED PYQT_SIP_DIR) + message(FATAL_ERROR "PYQT_SIP_DIR must be defined") + endif() +endif() + set(CMAKE_INSTALL_PYTHON "${PYTHON_SITE}/SeExpr2" ) # Other package dependencies... @@ -73,6 +76,7 @@ if(Qt5_FOUND OR QT4_FOUND) qt4_wrap_cpp(EDITOR_MOC_SRCS ${EDITOR_MOC_HDRS}) endif() + set(ANIMLIB_SRCS "") if (DEFINED ANIMLIB_DIR) set(CE_MOC_HDRS CE/CECurveListUI.h CE/CEDragHandlers.h CE/CEGraphCurve.h CE/CEGraphKey.h CE/CEGraphSeg.h CE/CEGraphUI.h CE/CEMainUI.h @@ -87,11 +91,12 @@ if(Qt5_FOUND OR QT4_FOUND) else() qt4_wrap_cpp(CE_MOC_SRCS ${CE_MOC_HDRS}) endif() + set(ANIMLIB_SRCS "${CE_CPPS} ${CE_MOC_SRCS}") endif() if (WIN32) add_library(SeExpr2Editor ${EDITOR_CPPS} ${EDITOR_MOC_SRCS} - ${CE_CPPS} ${CE_MOC_SRCS} + ${ANIMLIB_SRCS} ${editor_parser_cpp}) generate_export_header(SeExpr2Editor BASE_NAME SeExpr2Editor @@ -100,12 +105,11 @@ if(Qt5_FOUND OR QT4_FOUND) STATIC_DEFINE SeExpr2Editor_BUILT_AS_STATIC ) else() add_library(SeExpr2Editor SHARED ${EDITOR_CPPS} ${EDITOR_MOC_SRCS} - ${CE_CPPS} ${CE_MOC_SRCS} + ${ANIMLIB_SRCS} ${editor_parser_cpp}) endif() - include_directories(${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/CE) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(SeExpr2Editor SeExpr2) if (ENABLE_QT5) @@ -122,6 +126,7 @@ if(Qt5_FOUND OR QT4_FOUND) target_link_libraries(SeExpr2Editor ${GLUT_LIBRARY}) if (DEFINED ANIMLIB_DIR) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/CE) target_link_libraries(SeExpr2Editor animlib) endif()