@@ -34,15 +34,18 @@ if (EXISTS "/usr/share/apps/cmake/modules")
3434 list (APPEND CMAKE_MODULE_PATH "/usr/share/apps/cmake/modules" )
3535endif ()
3636
37- if (NOT DEFINED PYQT_SIP_DIR)
38- message (FATAL_ERROR "PYQT_SIP_DIR must be defined" )
39- endif ()
40-
4137if (NOT DEFINED PYQT_SIP_FLAGS)
4238 get_build_info(pyqt-sip-flags PYQT_SIP_FLAGS)
4339 separate_arguments (PYQT_SIP_FLAGS)
4440endif ()
4541
42+ if (NOT DEFINED PYQT_SIP_DIR)
43+ get_build_info(pyqt4-sip PYQT_SIP_DIR)
44+ if (NOT DEFINED PYQT_SIP_DIR)
45+ message (FATAL_ERROR "PYQT_SIP_DIR must be defined" )
46+ endif ()
47+ endif ()
48+
4649set (CMAKE_INSTALL_PYTHON "${PYTHON_SITE} /SeExpr2" )
4750
4851# Other package dependencies...
@@ -73,6 +76,7 @@ if(Qt5_FOUND OR QT4_FOUND)
7376 qt4_wrap_cpp(EDITOR_MOC_SRCS ${EDITOR_MOC_HDRS} )
7477 endif ()
7578
79+ set (ANIMLIB_SRCS "" )
7680 if (DEFINED ANIMLIB_DIR)
7781 set (CE_MOC_HDRS CE/CECurveListUI.h CE/CEDragHandlers.h CE/CEGraphCurve.h
7882 CE/CEGraphKey.h CE/CEGraphSeg.h CE/CEGraphUI.h CE/CEMainUI.h
@@ -87,11 +91,12 @@ if(Qt5_FOUND OR QT4_FOUND)
8791 else ()
8892 qt4_wrap_cpp(CE_MOC_SRCS ${CE_MOC_HDRS} )
8993 endif ()
94+ set (ANIMLIB_SRCS "${CE_CPPS} ${CE_MOC_SRCS} " )
9095 endif ()
9196
9297 if (WIN32 )
9398 add_library (SeExpr2Editor ${EDITOR_CPPS} ${EDITOR_MOC_SRCS}
94- ${CE_CPPS} ${CE_MOC_SRCS }
99+ ${ANIMLIB_SRCS }
95100 ${editor_parser_cpp} )
96101 generate_export_header(SeExpr2Editor
97102 BASE_NAME SeExpr2Editor
@@ -100,12 +105,11 @@ if(Qt5_FOUND OR QT4_FOUND)
100105 STATIC_DEFINE SeExpr2Editor_BUILT_AS_STATIC )
101106 else ()
102107 add_library (SeExpr2Editor SHARED ${EDITOR_CPPS} ${EDITOR_MOC_SRCS}
103- ${CE_CPPS} ${CE_MOC_SRCS }
108+ ${ANIMLIB_SRCS }
104109 ${editor_parser_cpp} )
105110 endif ()
106111
107- include_directories (${CMAKE_CURRENT_SOURCE_DIR}
108- ${CMAKE_CURRENT_SOURCE_DIR} /CE)
112+ include_directories (${CMAKE_CURRENT_SOURCE_DIR} )
109113 target_link_libraries (SeExpr2Editor SeExpr2)
110114
111115 if (ENABLE_QT5)
@@ -122,6 +126,7 @@ if(Qt5_FOUND OR QT4_FOUND)
122126 target_link_libraries (SeExpr2Editor ${GLUT_LIBRARY} )
123127
124128 if (DEFINED ANIMLIB_DIR)
129+ include_directories (${CMAKE_CURRENT_SOURCE_DIR} /CE)
125130 target_link_libraries (SeExpr2Editor animlib)
126131 endif ()
127132
0 commit comments