Added new CMake macro add_python_module() and some cleanup.
This commit is contained in:
parent
69c75b9ea9
commit
1e73466199
|
@ -316,3 +316,53 @@
|
||||||
set(${project}_FOUND FALSE)
|
set(${project}_FOUND FALSE)
|
||||||
endif(${project}_INCLUDE_DIR AND ${project}_LIBRARY)
|
endif(${project}_INCLUDE_DIR AND ${project}_LIBRARY)
|
||||||
endmacro(set_found project)
|
endmacro(set_found project)
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build a Python extention module.
|
||||||
|
# Usage:
|
||||||
|
# * clibSpec: The C/C++ shared part of the Python module.
|
||||||
|
# A four three list CLIB_NAME;version;soversion;
|
||||||
|
# - CLIB_NAME: the name of the C/C++ shared library
|
||||||
|
# - version: the full version number (ex: 1.0).
|
||||||
|
# - soversion: the shared version major (ex: 1).
|
||||||
|
# If the C library must not be generated because it is
|
||||||
|
# already included in another one, set to IGNORE.
|
||||||
|
# * pymodule: The name of the Python module (for "import PYMODULE").
|
||||||
|
# * deplibs: The list of dependencies.
|
||||||
|
#
|
||||||
|
macro( add_python_module pyCpps pyIncludes argClibSpec pymodule deplibs inc_install_dir )
|
||||||
|
set( pyDeplibs ${deplibs} )
|
||||||
|
# Force the argument <argClibSpec> to be parsed as a list.
|
||||||
|
set( clibSpec ${argClibSpec} )
|
||||||
|
list( GET clibSpec 0 clib )
|
||||||
|
|
||||||
|
message( STATUS ${clib} )
|
||||||
|
if( NOT (${clib} STREQUAL "Do_not_generate_C_library") )
|
||||||
|
list( LENGTH clibSpec clibLen )
|
||||||
|
if( NOT (clibLen EQUAL 3) )
|
||||||
|
message( FATAL_ERROR "python_module(): clibSpec doesnt't have exactly 3 elements (${clibSpec})." )
|
||||||
|
endif()
|
||||||
|
list( GET clibSpec 1 version )
|
||||||
|
list( GET clibSpec 2 soversion )
|
||||||
|
set( pyDeplibs ${clib} ${deplibs} )
|
||||||
|
|
||||||
|
add_library( ${clib} ${pyCpps} )
|
||||||
|
set_target_properties( ${clib} PROPERTIES VERSION ${version} SOVERSION ${soversion} )
|
||||||
|
target_link_libraries( ${clib} ${deplibs} )
|
||||||
|
install( TARGETS ${clib} DESTINATION lib${LIB_SUFFIX} )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set( pytarget "${pymodule}_target" )
|
||||||
|
|
||||||
|
add_library( ${pytarget} MODULE ${pyCpps} )
|
||||||
|
set_target_properties( ${pytarget} PROPERTIES
|
||||||
|
COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
||||||
|
PREFIX ""
|
||||||
|
OUTPUT_NAME ${pymodule}
|
||||||
|
)
|
||||||
|
target_link_libraries( ${pytarget} ${pyDeplibs} )
|
||||||
|
|
||||||
|
install( TARGETS ${pytarget} DESTINATION ${PYTHON_SITE_PACKAGES} )
|
||||||
|
install( FILES ${pyIncludes} DESTINATION ${inc_install_dir} )
|
||||||
|
endmacro( add_python_module )
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
-DPYTHON_SITE_PACKAGES="${PYTHON_SITE_PACKAGES}"
|
-DPYTHON_SITE_PACKAGES="${PYTHON_SITE_PACKAGES}"
|
||||||
)
|
)
|
||||||
|
|
||||||
set ( sources PyCRL.cpp
|
set( pyCpps PyCRL.cpp
|
||||||
PyBanner.cpp
|
PyBanner.cpp
|
||||||
PyCatalog.cpp
|
PyCatalog.cpp
|
||||||
PyCatalogState.cpp
|
PyCatalogState.cpp
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
PyAcmSigda.cpp
|
PyAcmSigda.cpp
|
||||||
PyIspd05.cpp
|
PyIspd05.cpp
|
||||||
)
|
)
|
||||||
set ( includes crlcore/PyBanner.h
|
set( pyIncludes crlcore/PyBanner.h
|
||||||
crlcore/PyCatalog.h
|
crlcore/PyCatalog.h
|
||||||
crlcore/PyCatalogState.h
|
crlcore/PyCatalogState.h
|
||||||
crlcore/PyEnvironment.h
|
crlcore/PyEnvironment.h
|
||||||
|
@ -57,20 +57,16 @@
|
||||||
crlcore/PyAcmSigda.h
|
crlcore/PyAcmSigda.h
|
||||||
crlcore/PyIspd05.h
|
crlcore/PyIspd05.h
|
||||||
)
|
)
|
||||||
|
set( depLibs crlcore
|
||||||
|
|
||||||
add_library ( pycrlcore ${sources} )
|
|
||||||
set_target_properties ( pycrlcore PROPERTIES VERSION 1.0 SOVERSION 1 )
|
|
||||||
target_link_libraries ( pycrlcore crlcore
|
|
||||||
${HURRICANE_PYTHON_LIBRARIES}
|
${HURRICANE_PYTHON_LIBRARIES}
|
||||||
${PYTHON_LIBRARIES} -lutil
|
${PYTHON_LIBRARIES}
|
||||||
)
|
-lutil
|
||||||
add_library ( CRL MODULE ${sources} )
|
|
||||||
target_link_libraries ( CRL pycrlcore )
|
|
||||||
set_target_properties ( CRL PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
|
||||||
PREFIX ""
|
|
||||||
)
|
)
|
||||||
|
|
||||||
install ( FILES ${includes} DESTINATION include/coriolis2/crlcore )
|
add_python_module( "${pyCpps}"
|
||||||
install ( TARGETS pycrlcore DESTINATION lib${LIB_SUFFIX} )
|
"${pyIncludes}"
|
||||||
install ( TARGETS CRL DESTINATION ${PYTHON_SITE_PACKAGES} )
|
"pycrlcore;1.0;1"
|
||||||
|
CRL
|
||||||
|
"${depLibs}"
|
||||||
|
include/coriolis2/crlcore
|
||||||
|
)
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# -*- explicit-buffer-name: "CMakeLists.txt<etesian/src>" -*-
|
# -*- explicit-buffer-name: "CMakeLists.txt<etesian/src>" -*-
|
||||||
|
|
||||||
# include( ${QT_USE_FILE} )
|
# include( ${QT_USE_FILE} )
|
||||||
|
|
||||||
include_directories( ${ETESIAN_SOURCE_DIR}/src
|
include_directories( ${ETESIAN_SOURCE_DIR}/src
|
||||||
${COLOQUINTE_INCLUDE_DIR}
|
${COLOQUINTE_INCLUDE_DIR}
|
||||||
${CORIOLIS_INCLUDE_DIR}
|
${CORIOLIS_INCLUDE_DIR}
|
||||||
|
@ -31,10 +30,8 @@
|
||||||
PyGraphicEtesianEngine.cpp
|
PyGraphicEtesianEngine.cpp
|
||||||
)
|
)
|
||||||
qtX_wrap_cpp( mocCpps ${mocIncludes} )
|
qtX_wrap_cpp( mocCpps ${mocIncludes} )
|
||||||
|
set( depLibs ${CORIOLIS_PYTHON_LIBRARIES}
|
||||||
add_library ( etesian ${cpps} ${mocCpps} ${pyCpps} )
|
${CORIOLIS_LIBRARIES}
|
||||||
set_target_properties ( etesian PROPERTIES VERSION 1.0 SOVERSION 1 )
|
|
||||||
target_link_libraries ( etesian ${CORIOLIS_LIBRARIES}
|
|
||||||
${HURRICANE_PYTHON_LIBRARIES}
|
${HURRICANE_PYTHON_LIBRARIES}
|
||||||
${HURRICANE_GRAPHICAL_LIBRARIES}
|
${HURRICANE_GRAPHICAL_LIBRARIES}
|
||||||
${HURRICANE_LIBRARIES}
|
${HURRICANE_LIBRARIES}
|
||||||
|
@ -53,22 +50,19 @@
|
||||||
${LIBEXECINFO_LIBRARIES}
|
${LIBEXECINFO_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library ( pyEtesian MODULE ${pyCpps} )
|
add_library( etesian ${cpps} ${mocCpps} ${pyCpps} )
|
||||||
set_target_properties ( pyEtesian PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
set_target_properties( etesian PROPERTIES VERSION 1.0 SOVERSION 1 )
|
||||||
PREFIX ""
|
target_link_libraries( etesian ${depLibs} )
|
||||||
OUTPUT_NAME "Etesian"
|
|
||||||
)
|
|
||||||
target_link_libraries ( pyEtesian etesian
|
|
||||||
${CORIOLIS_PYTHON_LIBRARIES}
|
|
||||||
|
|
||||||
# add_executable ( etesian.bin ${etesiancpps} )
|
add_python_module( "${pyCpps}"
|
||||||
#target_link_libraries ( etesian.bin etesian )
|
"${pyIncludes}"
|
||||||
|
"Do_not_generate_C_library"
|
||||||
|
Etesian
|
||||||
|
"etesian;${depLibs}"
|
||||||
|
include/coriolis2/etesian
|
||||||
)
|
)
|
||||||
|
|
||||||
install( TARGETS etesian DESTINATION lib${LIB_SUFFIX} )
|
install( TARGETS etesian DESTINATION lib${LIB_SUFFIX} )
|
||||||
# install ( TARGETS etesian.bin DESTINATION bin )
|
|
||||||
install ( TARGETS pyEtesian DESTINATION ${PYTHON_SITE_PACKAGES} )
|
|
||||||
|
|
||||||
install( FILES ${includes}
|
install( FILES ${includes}
|
||||||
${mocIncludes}
|
${mocIncludes} DESTINATION include/coriolis2/etesian )
|
||||||
${pyIncludes} DESTINATION include/coriolis2/etesian )
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
# -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt<hurricane/src/isobar>" -*-
|
# -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt<hurricane/src/isobar>" -*-
|
||||||
|
|
||||||
# include( ${QT_USE_FILE} )
|
# include( ${QT_USE_FILE} )
|
||||||
|
|
||||||
include_directories( ${HURRICANE_SOURCE_DIR}/src/hurricane
|
include_directories( ${HURRICANE_SOURCE_DIR}/src/hurricane
|
||||||
${HURRICANE_SOURCE_DIR}/src/viewer
|
${HURRICANE_SOURCE_DIR}/src/viewer
|
||||||
${HURRICANE_SOURCE_DIR}/src/isobar
|
${HURRICANE_SOURCE_DIR}/src/isobar
|
||||||
${PYTHON_INCLUDE_PATH}
|
${PYTHON_INCLUDE_PATH}
|
||||||
)
|
)
|
||||||
set ( sources ProxyProperty.cpp
|
set( pyCpps ProxyProperty.cpp
|
||||||
PyBreakpoint.cpp
|
PyBreakpoint.cpp
|
||||||
PyInterval.cpp
|
PyInterval.cpp
|
||||||
PyBox.cpp
|
PyBox.cpp
|
||||||
|
@ -71,7 +70,7 @@
|
||||||
PyQueryMask.cpp
|
PyQueryMask.cpp
|
||||||
PyQuery.cpp
|
PyQuery.cpp
|
||||||
)
|
)
|
||||||
set ( includes hurricane/isobar/ProxyProperty.h
|
set( pyIncludes hurricane/isobar/ProxyProperty.h
|
||||||
hurricane/isobar/PyBreakpoint.h
|
hurricane/isobar/PyBreakpoint.h
|
||||||
hurricane/isobar/PyInterval.h
|
hurricane/isobar/PyInterval.h
|
||||||
hurricane/isobar/PyBox.h
|
hurricane/isobar/PyBox.h
|
||||||
|
@ -136,16 +135,15 @@
|
||||||
hurricane/isobar/PyQuery.h
|
hurricane/isobar/PyQuery.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set( depLibs hurricane
|
||||||
add_library ( isobar ${sources} )
|
${Boost_LIBRARIES}
|
||||||
set_target_properties ( isobar PROPERTIES VERSION 1.0 SOVERSION 1 )
|
${PYTHON_LIBRARIES}
|
||||||
target_link_libraries ( isobar hurricane ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
|
)
|
||||||
add_library ( Hurricane MODULE ${sources} )
|
|
||||||
set_target_properties ( Hurricane PROPERTIES
|
add_python_module( "${pyCpps}"
|
||||||
COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
"${pyIncludes}"
|
||||||
PREFIX ""
|
"isobar;1.0;1"
|
||||||
|
Hurricane
|
||||||
|
"${depLibs}"
|
||||||
|
include/coriolis2/hurricane/isobar
|
||||||
)
|
)
|
||||||
target_link_libraries ( Hurricane isobar )
|
|
||||||
install ( TARGETS isobar DESTINATION lib${LIB_SUFFIX} )
|
|
||||||
install ( TARGETS Hurricane DESTINATION ${PYTHON_SITE_PACKAGES} )
|
|
||||||
install ( FILES ${includes} DESTINATION include/coriolis2/hurricane/isobar )
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
${PYTHON_INCLUDE_PATH}
|
${PYTHON_INCLUDE_PATH}
|
||||||
)
|
)
|
||||||
|
|
||||||
set ( mocincludes hurricane/viewer/HApplication.h
|
set( mocIncludes hurricane/viewer/HApplication.h
|
||||||
hurricane/viewer/PaletteItem.h
|
hurricane/viewer/PaletteItem.h
|
||||||
hurricane/viewer/PaletteNamedItem.h
|
hurricane/viewer/PaletteNamedItem.h
|
||||||
hurricane/viewer/PaletteLayerItem.h
|
hurricane/viewer/PaletteLayerItem.h
|
||||||
|
@ -56,13 +56,14 @@
|
||||||
hurricane/viewer/SelectorCriterion.h
|
hurricane/viewer/SelectorCriterion.h
|
||||||
hurricane/viewer/CellWidgets.h
|
hurricane/viewer/CellWidgets.h
|
||||||
)
|
)
|
||||||
set ( pyincludes hurricane/viewer/PyHSVr.h
|
set( pyIncludes hurricane/viewer/PyHSVr.h
|
||||||
hurricane/viewer/PyDrawingStyle.h
|
hurricane/viewer/PyDrawingStyle.h
|
||||||
hurricane/viewer/PyDrawingGroup.h
|
hurricane/viewer/PyDrawingGroup.h
|
||||||
hurricane/viewer/PyDisplayStyle.h
|
hurricane/viewer/PyDisplayStyle.h
|
||||||
hurricane/viewer/PyHApplication.h
|
hurricane/viewer/PyHApplication.h
|
||||||
hurricane/viewer/PyGraphics.h
|
hurricane/viewer/PyGraphics.h
|
||||||
hurricane/viewer/PyCellViewer.h
|
hurricane/viewer/PyCellViewer.h
|
||||||
|
hurricane/viewer/Script.h
|
||||||
)
|
)
|
||||||
set( cpps HApplication.cpp
|
set( cpps HApplication.cpp
|
||||||
ScreenUtilities.cpp
|
ScreenUtilities.cpp
|
||||||
|
@ -107,7 +108,7 @@
|
||||||
ControllerWidget.cpp
|
ControllerWidget.cpp
|
||||||
ScriptWidget.cpp
|
ScriptWidget.cpp
|
||||||
)
|
)
|
||||||
set ( pycpps PyHSVr.cpp
|
set( pyCpps PyHSVr.cpp
|
||||||
PyDrawingStyle.cpp
|
PyDrawingStyle.cpp
|
||||||
PyDrawingGroup.cpp
|
PyDrawingGroup.cpp
|
||||||
PyDisplayStyle.cpp
|
PyDisplayStyle.cpp
|
||||||
|
@ -115,18 +116,13 @@
|
||||||
PyGraphics.cpp
|
PyGraphics.cpp
|
||||||
PyViewer.cpp
|
PyViewer.cpp
|
||||||
PyCellViewer.cpp
|
PyCellViewer.cpp
|
||||||
|
Script.cpp
|
||||||
)
|
)
|
||||||
# source2 & include2 for module that are *not* Python wrappers but true
|
|
||||||
# Hurricane modules.
|
|
||||||
set ( sources2 Script.cpp )
|
|
||||||
set ( includes2 hurricane/viewer/Script.h )
|
|
||||||
|
|
||||||
qtX_wrap_cpp ( MOC_SRCS ${mocincludes} )
|
qtX_wrap_cpp( MOC_SRCS ${mocIncludes} )
|
||||||
qtX_add_resources( RCC_SRCS CellViewer.qrc )
|
qtX_add_resources( RCC_SRCS CellViewer.qrc )
|
||||||
|
|
||||||
add_library ( viewer ${cpps} ${MOC_SRCS} ${RCC_SRCS} ${sources2} ${pycpps} )
|
set( depLibs hurricane
|
||||||
set_target_properties ( viewer PROPERTIES VERSION 1.0 SOVERSION 1 )
|
|
||||||
target_link_libraries ( viewer hurricane
|
|
||||||
isobar
|
isobar
|
||||||
${UTILITIES_LIBRARY}
|
${UTILITIES_LIBRARY}
|
||||||
${CONFIGURATION_LIBRARY}
|
${CONFIGURATION_LIBRARY}
|
||||||
|
@ -134,18 +130,19 @@
|
||||||
${Boost_LIBRARIES}
|
${Boost_LIBRARIES}
|
||||||
${QtX_LIBRARIES}
|
${QtX_LIBRARIES}
|
||||||
)
|
)
|
||||||
add_library ( pyViewer MODULE ${pycpps} )
|
|
||||||
target_link_libraries ( pyViewer viewer )
|
add_library( viewer ${cpps} ${MOC_SRCS} ${RCC_SRCS} ${pyCpps} )
|
||||||
set_target_properties ( pyViewer PROPERTIES
|
set_target_properties( viewer PROPERTIES VERSION 1.0 SOVERSION 1 )
|
||||||
COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
target_link_libraries( viewer ${depLibs} )
|
||||||
OUTPUT_NAME "Viewer"
|
|
||||||
PREFIX ""
|
add_python_module( "${pyCpps}"
|
||||||
|
"${pyIncludes}"
|
||||||
|
"Do_not_generate_C_library"
|
||||||
|
Viewer
|
||||||
|
"viewer;${depLibs}"
|
||||||
|
include/coriolis2/hurricane/viewer
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
install( FILES ${includes}
|
install( FILES ${includes}
|
||||||
${includes2}
|
${mocIncludes} DESTINATION include/coriolis2/hurricane/viewer )
|
||||||
${mocincludes}
|
|
||||||
${pyincludes} DESTINATION include/coriolis2/hurricane/viewer )
|
|
||||||
install( TARGETS viewer DESTINATION lib${LIB_SUFFIX} )
|
install( TARGETS viewer DESTINATION lib${LIB_SUFFIX} )
|
||||||
install ( TARGETS pyViewer DESTINATION ${PYTHON_SITE_PACKAGES} )
|
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(__PYTHON_MODULE__)
|
||||||
|
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include "hurricane/Error.h"
|
#include "hurricane/Error.h"
|
||||||
|
@ -303,3 +305,5 @@ namespace Isobar {
|
||||||
|
|
||||||
|
|
||||||
} // End of Isobar namespace.
|
} // End of Isobar namespace.
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
// +-----------------------------------------------------------------+
|
// +-----------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(__PYTHON_MODULE__)
|
||||||
|
|
||||||
#ifndef ISOBAR_SCRIPT_H
|
#ifndef ISOBAR_SCRIPT_H
|
||||||
#define ISOBAR_SCRIPT_H
|
#define ISOBAR_SCRIPT_H
|
||||||
|
|
||||||
|
@ -97,7 +99,8 @@ namespace Isobar {
|
||||||
{ return _userModule = _importModule(_moduleName,flags); }
|
{ return _userModule = _importModule(_moduleName,flags); }
|
||||||
|
|
||||||
|
|
||||||
} // End of Isobar namespace.
|
} // Isobar namespace.
|
||||||
|
|
||||||
|
|
||||||
#endif // ISOBAR_SCRIPT_H
|
#endif // ISOBAR_SCRIPT_H
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -5,7 +5,6 @@ if ( CHECK_DETERMINISM )
|
||||||
endif ( CHECK_DETERMINISM )
|
endif ( CHECK_DETERMINISM )
|
||||||
|
|
||||||
# include( ${QT_USE_FILE} )
|
# include( ${QT_USE_FILE} )
|
||||||
|
|
||||||
include_directories( ${KATABATIC_SOURCE_DIR}/src
|
include_directories( ${KATABATIC_SOURCE_DIR}/src
|
||||||
${CORIOLIS_INCLUDE_DIR}
|
${CORIOLIS_INCLUDE_DIR}
|
||||||
${HURRICANE_INCLUDE_DIR}
|
${HURRICANE_INCLUDE_DIR}
|
||||||
|
@ -32,7 +31,6 @@ endif ( CHECK_DETERMINISM )
|
||||||
katabatic/GCellGrid.h
|
katabatic/GCellGrid.h
|
||||||
katabatic/Session.h
|
katabatic/Session.h
|
||||||
katabatic/KatabaticEngine.h
|
katabatic/KatabaticEngine.h
|
||||||
#katabatic/GraphicKatabaticEngine.h
|
|
||||||
)
|
)
|
||||||
set( mocIncludes katabatic/GraphicKatabaticEngine.h )
|
set( mocIncludes katabatic/GraphicKatabaticEngine.h )
|
||||||
set( cpps Configuration.cpp
|
set( cpps Configuration.cpp
|
||||||
|
@ -57,15 +55,11 @@ endif ( CHECK_DETERMINISM )
|
||||||
NetConstraints.cpp
|
NetConstraints.cpp
|
||||||
NetOptimals.cpp
|
NetOptimals.cpp
|
||||||
KatabaticEngine.cpp
|
KatabaticEngine.cpp
|
||||||
#GraphicKatabaticEngine.cpp
|
|
||||||
)
|
)
|
||||||
set( pyCpps PyKatabatic.cpp )
|
set( pyCpps PyKatabatic.cpp )
|
||||||
qtX_wrap_cpp( mocCpps ${mocIncludes} )
|
qtX_wrap_cpp( mocCpps ${mocIncludes} )
|
||||||
|
|
||||||
|
set( depLibs ${KNIK_LIBRARIES}
|
||||||
add_library ( katabatic ${cpps} )
|
|
||||||
set_target_properties ( katabatic PROPERTIES VERSION 1.0 SOVERSION 1 )
|
|
||||||
target_link_libraries ( katabatic ${KNIK_LIBRARIES}
|
|
||||||
${CORIOLIS_LIBRARIES}
|
${CORIOLIS_LIBRARIES}
|
||||||
${HURRICANE_PYTHON_LIBRARIES}
|
${HURRICANE_PYTHON_LIBRARIES}
|
||||||
${HURRICANE_GRAPHICAL_LIBRARIES}
|
${HURRICANE_GRAPHICAL_LIBRARIES}
|
||||||
|
@ -80,17 +74,20 @@ endif ( CHECK_DETERMINISM )
|
||||||
${LIBXML2_LIBRARIES}
|
${LIBXML2_LIBRARIES}
|
||||||
${PYTHON_LIBRARIES} -lutil
|
${PYTHON_LIBRARIES} -lutil
|
||||||
)
|
)
|
||||||
add_library ( pyKatabatic MODULE ${pyCpps} )
|
|
||||||
set_target_properties ( pyKatabatic PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
add_library( katabatic ${cpps} )
|
||||||
PREFIX ""
|
set_target_properties( katabatic PROPERTIES VERSION 1.0 SOVERSION 1 )
|
||||||
OUTPUT_NAME "Katabatic"
|
target_link_libraries( katabatic ${depLibs} )
|
||||||
)
|
|
||||||
target_link_libraries ( pyKatabatic katabatic
|
add_python_module( "${pyCpps}"
|
||||||
${CORIOLIS_PYTHON_LIBRARIES}
|
"${pyIncludes}"
|
||||||
|
"Do_not_generate_C_library"
|
||||||
|
Katabatic
|
||||||
|
"katabatic;${depLibs}"
|
||||||
|
include/coriolis2/katabatic
|
||||||
)
|
)
|
||||||
|
|
||||||
install( TARGETS katabatic DESTINATION lib${LIB_SUFFIX} )
|
install( TARGETS katabatic DESTINATION lib${LIB_SUFFIX} )
|
||||||
install ( TARGETS pyKatabatic DESTINATION ${PYTHON_SITE_PACKAGES} )
|
|
||||||
install( FILES ${includes}
|
install( FILES ${includes}
|
||||||
${mocIncludes} DESTINATION include/coriolis2/katabatic )
|
${mocIncludes} DESTINATION include/coriolis2/katabatic )
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# -*- explicit-buffer-name: "CMakeLists.txt<kite/src>" -*-
|
# -*- explicit-buffer-name: "CMakeLists.txt<kite/src>" -*-
|
||||||
|
|
||||||
# include( ${QT_USE_FILE} )
|
# include( ${QT_USE_FILE} )
|
||||||
|
|
||||||
include_directories( ${KITE_SOURCE_DIR}/src
|
include_directories( ${KITE_SOURCE_DIR}/src
|
||||||
${CORIOLIS_INCLUDE_DIR}
|
${CORIOLIS_INCLUDE_DIR}
|
||||||
${HURRICANE_INCLUDE_DIR}
|
${HURRICANE_INCLUDE_DIR}
|
||||||
|
@ -70,15 +69,13 @@
|
||||||
PyKiteEngine.cpp
|
PyKiteEngine.cpp
|
||||||
PyGraphicKiteEngine.cpp
|
PyGraphicKiteEngine.cpp
|
||||||
)
|
)
|
||||||
set ( kitecpps KiteMain.cpp )
|
set( kiteCpps KiteMain.cpp )
|
||||||
qtX_wrap_cpp( mocCpps ${mocIncludes} )
|
qtX_wrap_cpp( mocCpps ${mocIncludes} )
|
||||||
|
|
||||||
|
set( depLibs ${KATABATIC_LIBRARIES}
|
||||||
add_library ( kite ${cpps} ${mocCpps} ${pyCpps} )
|
|
||||||
set_target_properties ( kite PROPERTIES VERSION 1.0 SOVERSION 1 )
|
|
||||||
target_link_libraries ( kite ${KATABATIC_LIBRARIES}
|
|
||||||
${KNIK_LIBRARIES}
|
${KNIK_LIBRARIES}
|
||||||
${NIMBUS_LIBRARIES}
|
${NIMBUS_LIBRARIES}
|
||||||
|
${CORIOLIS_PYTHON_LIBRARIES}
|
||||||
${CORIOLIS_LIBRARIES}
|
${CORIOLIS_LIBRARIES}
|
||||||
${HURRICANE_PYTHON_LIBRARIES}
|
${HURRICANE_PYTHON_LIBRARIES}
|
||||||
${HURRICANE_GRAPHICAL_LIBRARIES}
|
${HURRICANE_GRAPHICAL_LIBRARIES}
|
||||||
|
@ -97,23 +94,24 @@
|
||||||
${LIBEXECINFO_LIBRARIES}
|
${LIBEXECINFO_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library ( pyKite MODULE ${pyCpps} )
|
add_library( kite ${cpps} ${mocCpps} ${pyCpps} )
|
||||||
set_target_properties ( pyKite PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
set_target_properties( kite PROPERTIES VERSION 1.0 SOVERSION 1 )
|
||||||
PREFIX ""
|
target_link_libraries( kite ${depLibs} )
|
||||||
OUTPUT_NAME "Kite"
|
|
||||||
|
add_python_module( "${pyCpps}"
|
||||||
|
"${pyIncludes}"
|
||||||
|
"Do_not_generate_C_library"
|
||||||
|
Kite
|
||||||
|
"kite;${depLibs}"
|
||||||
|
include/coriolis2/kite
|
||||||
)
|
)
|
||||||
|
|
||||||
# add_executable ( kite.bin ${kitecpps} )
|
# add_executable( kite.bin ${kiteCpps} )
|
||||||
#target_link_libraries ( kite.bin kite )
|
#target_link_libraries( kite.bin kite ${depLibs} )
|
||||||
target_link_libraries ( pyKite kite
|
|
||||||
${CORIOLIS_PYTHON_LIBRARIES}
|
|
||||||
)
|
|
||||||
install( TARGETS kite DESTINATION lib${LIB_SUFFIX} )
|
install( TARGETS kite DESTINATION lib${LIB_SUFFIX} )
|
||||||
# install( TARGETS kite.bin DESTINATION bin )
|
# install( TARGETS kite.bin DESTINATION bin )
|
||||||
install ( TARGETS pyKite DESTINATION ${PYTHON_SITE_PACKAGES} )
|
|
||||||
|
|
||||||
install( FILES ${includes}
|
install( FILES ${includes}
|
||||||
${mocIncludes}
|
${mocIncludes} DESTINATION include/coriolis2/kite )
|
||||||
${pyIncludes} DESTINATION include/coriolis2/kite )
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
# -*- explicit-buffer-name: "CMakeLists.txt<knik/src>" -*-
|
||||||
|
|
||||||
# include ( ${QT_USE_FILE} )
|
# include ( ${QT_USE_FILE} )
|
||||||
|
|
||||||
include_directories ( ${KNIK_SOURCE_DIR}/src
|
include_directories ( ${KNIK_SOURCE_DIR}/src
|
||||||
${KNIK_SOURCE_DIR}/src/flute-2.4/src
|
${KNIK_SOURCE_DIR}/src/flute-2.4/src
|
||||||
${HURRICANE_INCLUDE_DIR}
|
${HURRICANE_INCLUDE_DIR}
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#find_package(SOLSTICE REQUIRED)
|
#find_package(SOLSTICE REQUIRED)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
add_subdirectory(python)
|
||||||
add_subdirectory(cmake_modules)
|
add_subdirectory(cmake_modules)
|
||||||
|
|
||||||
if(BUILD_DOC)
|
if(BUILD_DOC)
|
||||||
|
|
|
@ -18,7 +18,7 @@ IF(UNIX)
|
||||||
FIND_PATH(UNICORN_INCLUDE_PATH NAMES unicorn/UnicornGui.h PATHS
|
FIND_PATH(UNICORN_INCLUDE_PATH NAMES unicorn/UnicornGui.h PATHS
|
||||||
# Look in other places.
|
# Look in other places.
|
||||||
${CORIOLIS_DIR_SEARCH}
|
${CORIOLIS_DIR_SEARCH}
|
||||||
PATH_SUFFIXES include/coriolis
|
PATH_SUFFIXES include/coriolis2 include
|
||||||
# Help the user find it if we cannot.
|
# Help the user find it if we cannot.
|
||||||
DOC "The ${UNICORN_INCLUDE_PATH_DESCRIPTION}"
|
DOC "The ${UNICORN_INCLUDE_PATH_DESCRIPTION}"
|
||||||
)
|
)
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
# -*- explicit-buffer-name: "CMakeLists.txt<unicorn/python>" -*-
|
||||||
|
|
||||||
|
install( FILES unicornInit.py DESTINATION ${PYTHON_SITE_PACKAGES}/unicorn )
|
||||||
|
|
|
@ -37,9 +37,7 @@
|
||||||
qtX_wrap_cpp( mocCpps ${mocincludes} )
|
qtX_wrap_cpp( mocCpps ${mocincludes} )
|
||||||
qtX_add_resources( RCC_SRCS Unicorn.qrc )
|
qtX_add_resources( RCC_SRCS Unicorn.qrc )
|
||||||
|
|
||||||
add_library ( unicorn ${cpps} ${mocCpps} ${pyCpps} )
|
set( depLibs ${SOLSTICE_GRAPHICAL_LIBRARIES}
|
||||||
set_target_properties ( unicorn PROPERTIES VERSION 1.0 SOVERSION 1 )
|
|
||||||
target_link_libraries ( unicorn ${SOLSTICE_GRAPHICAL_LIBRARIES}
|
|
||||||
${SOLSTICE_LIBRARIES}
|
${SOLSTICE_LIBRARIES}
|
||||||
${EQUINOX_GRAPHICAL_LIBRARIES}
|
${EQUINOX_GRAPHICAL_LIBRARIES}
|
||||||
${EQUINOX_LIBRARIES}
|
${EQUINOX_LIBRARIES}
|
||||||
|
@ -76,23 +74,25 @@
|
||||||
-lutil
|
-lutil
|
||||||
${LIBXML2_LIBRARIES}
|
${LIBXML2_LIBRARIES}
|
||||||
)
|
)
|
||||||
add_library ( pyUnicorn MODULE ${pyCpps} )
|
|
||||||
target_link_libraries ( pyUnicorn unicorn )
|
add_library( unicorn ${cpps} ${mocCpps} ${pyCpps} )
|
||||||
set_target_properties ( pyUnicorn PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
set_target_properties( unicorn PROPERTIES VERSION 1.0 SOVERSION 1 )
|
||||||
PREFIX ""
|
target_link_libraries( unicorn ${depLibs} )
|
||||||
OUTPUT_NAME "Unicorn"
|
|
||||||
|
add_python_module( "${pyCpps}"
|
||||||
|
"${pyIncludes}"
|
||||||
|
"Do_not_generate_C_library"
|
||||||
|
Unicorn
|
||||||
|
"unicorn;${depLibs}"
|
||||||
|
include/coriolis2/unicorn
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable( cgt.bin ${cgtcpp} )
|
add_executable( cgt.bin ${cgtcpp} )
|
||||||
target_link_libraries ( cgt.bin unicorn )
|
target_link_libraries( cgt.bin unicorn ${depLibs} )
|
||||||
|
|
||||||
install( TARGETS unicorn DESTINATION lib${LIB_SUFFIX} )
|
install( TARGETS unicorn DESTINATION lib${LIB_SUFFIX} )
|
||||||
install ( TARGETS pyUnicorn DESTINATION ${PYTHON_SITE_PACKAGES} )
|
|
||||||
install( TARGETS cgt.bin DESTINATION bin )
|
install( TARGETS cgt.bin DESTINATION bin )
|
||||||
install( PROGRAMS cgt.py DESTINATION bin RENAME cgt )
|
install( PROGRAMS cgt.py DESTINATION bin RENAME cgt )
|
||||||
install( FILES ${includes}
|
install( FILES ${includes}
|
||||||
${mocincludes}
|
${mocincludes} DESTINATION include/coriolis2/unicorn )
|
||||||
${pyIncludes} DESTINATION include/coriolis2/unicorn )
|
|
||||||
install ( FILES init/unicornInit.py
|
|
||||||
DESTINATION ${PYTHON_SITE_PACKAGES}/unicorn )
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue