# Autogenerated file, run tools/build/setup_cmake.py to regenerate add_definitions(-DIMP_SWIG_WRAPPER) include_directories(${ANN_INCLUDE_PATH} ${BOOST.FILESYSTEM_INCLUDE_PATH} ${BOOST.PROGRAMOPTIONS_INCLUDE_PATH} ${BOOST.RANDOM_INCLUDE_PATH} ${BOOST.SYSTEM_INCLUDE_PATH} ${CGAL_INCLUDE_PATH} ${GPERFTOOLS_INCLUDE_PATH} ${LOG4CXX_INCLUDE_PATH} ${TCMALLOC_HEAPCHECKER_INCLUDE_PATH} ${TCMALLOC_HEAPPROFILER_INCLUDE_PATH}) link_directories(${ANN_LINK_PATH} ${BOOST.FILESYSTEM_LINK_PATH} ${BOOST.PROGRAMOPTIONS_LINK_PATH} ${BOOST.RANDOM_LINK_PATH} ${BOOST.SYSTEM_LINK_PATH} ${CGAL_LINK_PATH} ${GPERFTOOLS_LINK_PATH} ${LOG4CXX_LINK_PATH} ${TCMALLOC_HEAPCHECKER_LINK_PATH} ${TCMALLOC_HEAPPROFILER_LINK_PATH}) GET_DIRECTORY_PROPERTY(includes INCLUDE_DIRECTORIES) # SWIG doesn't need Python.h in its own include path include_directories(${PYTHON_INCLUDE_DIRS}) # this is needed for some reason that I don't understand set(swig_path ${ANN_SWIG_PATH} ${BOOST.FILESYSTEM_SWIG_PATH} ${BOOST.PROGRAMOPTIONS_SWIG_PATH} ${BOOST.RANDOM_SWIG_PATH} ${BOOST.SYSTEM_SWIG_PATH} ${CGAL_SWIG_PATH} ${GPERFTOOLS_SWIG_PATH} ${LOG4CXX_SWIG_PATH} ${TCMALLOC_HEAPCHECKER_SWIG_PATH} ${TCMALLOC_HEAPPROFILER_SWIG_PATH} ${IMP_SWIG_PATH}) file(STRINGS "${PROJECT_BINARY_DIR}/src/core_swig.deps" swigdeps) set(wrap_py "${PROJECT_BINARY_DIR}/lib/IMP/core/__init__.py") set(wrap_py_orig "${PROJECT_BINARY_DIR}/src/core_swig/IMP.core.py") set(source ${PROJECT_BINARY_DIR}/src/core_swig/wrap.cpp ${PROJECT_BINARY_DIR}/src/core_swig/wrap.h) set(PATH_ARGS ) foreach(path ${includes}) list(APPEND PATH_ARGS "--includepath=${path}") endforeach(path) foreach(path ${swig_path}) list(APPEND PATH_ARGS "--swigpath=${path}") endforeach(path) add_custom_command(OUTPUT ${source} ${wrap_py} ${wrap_py_orig} COMMAND python "${PROJECT_SOURCE_DIR}/tools/build/make_swig_wrapper.py" "--swig=${SWIG_EXECUTABLE}" "--module=core" ${PATH_ARGS} DEPENDS ${swigdeps} ${IMP_CORE_PYTHON_EXTRA_DEPENDENCIES} WORKING_DIRECTORY ${PROJECT_BINARY_DIR} COMMENT "Running swig on core") add_library(_IMP_core MODULE ${source}) set_target_properties(_IMP_core PROPERTIES PREFIX "") if(WIN32 AND NOT CYGWIN) set_target_properties(_IMP_core PROPERTIES SUFFIX ".pyd") endif() target_link_libraries(_IMP_core imp_core ${IMP_BASE_LIBRARY} ${IMP_CGAL_LIBRARY} ${IMP_ALGEBRA_LIBRARY} ${IMP_KERNEL_LIBRARY} ${IMP_DISPLAY_LIBRARY} ${IMP_SCORE_FUNCTOR_LIBRARY} ${BOOST.FILESYSTEM_LIBRARIES} ${BOOST.PROGRAMOPTIONS_LIBRARIES} ${BOOST.SYSTEM_LIBRARIES} ${GPERFTOOLS_LIBRARIES} ${TCMALLOC_HEAPPROFILER_LIBRARIES} ${TCMALLOC_HEAPCHECKER_LIBRARIES} ${LOG4CXX_LIBRARIES} ${BOOST.RANDOM_LIBRARIES} ${CGAL_LIBRARIES} ${ANN_LIBRARIES} ${IMP_SWIG_LIBRARIES} ) add_custom_target("imp_core_python" ALL DEPENDS ${source} _IMP_core ${wrap_py} ) INSTALL(TARGETS _IMP_core DESTINATION ${CMAKE_INSTALL_PYTHONDIR}) # Install the original wrapper, since wrap_py is a symlink and install does # not dereference symlinks INSTALL(FILES ${wrap_py_orig} DESTINATION ${CMAKE_INSTALL_PYTHONDIR}/IMP/core RENAME __init__.py)