# Autogenerated file, run tools/build/setup_cmake.py to regenerate add_definitions(-DIMP_SWIG_WRAPPER) include_directories(${BOOST.FILESYSTEM_INCLUDE_PATH} ${BOOST.PROGRAMOPTIONS_INCLUDE_PATH} ${BOOST.RANDOM_INCLUDE_PATH} ${BOOST.SYSTEM_INCLUDE_PATH} ${GPERFTOOLS_INCLUDE_PATH} ${LOG4CXX_INCLUDE_PATH} ${TCMALLOC_HEAPCHECKER_INCLUDE_PATH} ${TCMALLOC_HEAPPROFILER_INCLUDE_PATH}) link_directories(${BOOST.FILESYSTEM_LINK_PATH} ${BOOST.PROGRAMOPTIONS_LINK_PATH} ${BOOST.RANDOM_LINK_PATH} ${BOOST.SYSTEM_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 ${BOOST.FILESYSTEM_SWIG_PATH} ${BOOST.PROGRAMOPTIONS_SWIG_PATH} ${BOOST.RANDOM_SWIG_PATH} ${BOOST.SYSTEM_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/kmeans_swig.deps" swigdeps) set(wrap_py "${PROJECT_BINARY_DIR}/lib/IMP/kmeans/__init__.py") set(wrap_py_orig "${PROJECT_BINARY_DIR}/src/kmeans_swig/IMP.kmeans.py") set(source ${PROJECT_BINARY_DIR}/src/kmeans_swig/wrap.cpp ${PROJECT_BINARY_DIR}/src/kmeans_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=kmeans" ${PATH_ARGS} DEPENDS ${swigdeps} ${IMP_KMEANS_PYTHON_EXTRA_DEPENDENCIES} WORKING_DIRECTORY ${PROJECT_BINARY_DIR} COMMENT "Running swig on kmeans") add_library(_IMP_kmeans MODULE ${source}) set_target_properties(_IMP_kmeans PROPERTIES PREFIX "") if(WIN32 AND NOT CYGWIN) set_target_properties(_IMP_kmeans PROPERTIES SUFFIX ".pyd") endif() target_link_libraries(_IMP_kmeans imp_kmeans ${IMP_BASE_LIBRARY} ${BOOST.FILESYSTEM_LIBRARIES} ${BOOST.PROGRAMOPTIONS_LIBRARIES} ${BOOST.SYSTEM_LIBRARIES} ${GPERFTOOLS_LIBRARIES} ${TCMALLOC_HEAPPROFILER_LIBRARIES} ${TCMALLOC_HEAPCHECKER_LIBRARIES} ${LOG4CXX_LIBRARIES} ${BOOST.RANDOM_LIBRARIES} ${IMP_SWIG_LIBRARIES} ) add_custom_target("imp_kmeans_python" ALL DEPENDS ${source} _IMP_kmeans ${wrap_py} ) INSTALL(TARGETS _IMP_kmeans 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/kmeans RENAME __init__.py)