File: CMakeLists.txt

package info (click to toggle)
tulip 4.8.0dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 179,264 kB
  • ctags: 64,517
  • sloc: cpp: 600,444; ansic: 36,311; makefile: 22,136; python: 1,304; sh: 946; yacc: 522; xml: 337; pascal: 157; php: 66; lex: 55
file content (27 lines) | stat: -rw-r--r-- 1,864 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
IF(PYTHONINTERP_FOUND AND SIP_OK)

CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in ${CMAKE_CURRENT_SOURCE_DIR}/conf.py)

# On windows, it is required that the paths to the dll dependencies (e.g. zlib, libpng, ...) are contained
# in the CMAKE_LIBRARY_PATH variable (especially with Visual Studio).
# Some warnings will be output when configuring the whole project if it is not the case.
# Otherwise, the Python API documentation will not be generated as the import of the tulip modules will fail.

# Turn CMAKE_LIBRARY_PATH list into a string in order to pass all its contents to the CMake command generating the doc,
# only the first list entry is transferred otherwise.
STRING(REPLACE ";" "," CMAKE_LIBRARY_PATH_STR "${CMAKE_LIBRARY_PATH}")

ADD_CUSTOM_TARGET(pythonBindingsDoc ALL ${CMAKE_COMMAND} -DSPHINX_EXECUTABLE=${SPHINX_EXECUTABLE} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
                                                         -DBIN_DIR=${CMAKE_CURRENT_BINARY_DIR} -DSRC_DIR=${CMAKE_CURRENT_SOURCE_DIR}
                                                         -DSYSTEM_SIP=${SYSTEM_SIP} -DSIP_VERSION=${SIP_VERSION_STR} -DQT_BIN_DIR=${QT_BINARY_DIR}
                                                         -DMSVC=${MSVC} -DAPPLE=${APPLE} -DCMAKE_LIBRARY_PATH=${CMAKE_LIBRARY_PATH_STR}
                                                         -P ${CMAKE_CURRENT_SOURCE_DIR}/genSphinxDoc.cmake
                                    DEPENDS ${LibTulipCorePythonBindingsName} ${LibTulipOGLPythonBindingsName} ${LibTulipGUIPythonBindingsName} ${LibStlPythonBindingsName} VERBATIM)

SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "doc;doctrees") 

INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html 
        DESTINATION ${TulipShareInstallDir}/doc/tulip-python
        COMPONENT tulip_python_doc)

ENDIF(PYTHONINTERP_FOUND AND SIP_OK)