# # $Id: CMakeLists.txt,v 1.5 2006/07/13 04:47:56 pkaz Exp $ # # Backward compatibility CMAKE_MINIMUM_REQUIRED(VERSION 2.0) PROJECT(mskccRobot) # Create mskccRobot as a shared library ADD_LIBRARY(mskccRobot SHARED src/mskccRobot.cpp include/mskccRobot.h) CISST_REQUIRES("mskccRobot" "cisstCommon;cisstVector") TARGET_LINK_LIBRARIES(mskccRobot DMC32) # Make sure that the .py file goes with the libraries SET(CMAKE_SWIG_FLAGS -outdir "${mskccRobot_BINARY_DIR}") # Allow generated c++ code to find header files INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) INCLUDE_DIRECTORIES(${CISST_SWIG_INCLUDE_DIR}) # To link with build libraries LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) SET(interface ${CMAKE_CURRENT_SOURCE_DIR}/wrapping/mskccRobotPython.i) # We are using C++ code SET_SOURCE_FILES_PROPERTIES(${interface} PROPERTIES CPLUSPLUS ON) # Set the verbose and modern flags SET_SOURCE_FILES_PROPERTIES(${interface} PROPERTIES SWIG_FLAGS "-v;-modern") SWIG_ADD_MODULE(mskccRobotPython python ${interface}) SWIG_LINK_LIBRARIES(mskccRobotPython debug ${PYTHON_DEBUG_LIBRARY} optimized ${PYTHON_LIBRARY} mskccRobot) # Copy the .py file generated to wherever the libraries are ADD_CUSTOM_COMMAND(TARGET _mskccRobotPython POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy ${mskccRobot_BINARY_DIR}/mskccRobotPython.py ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/mskccRobotPython.py) # Make clean removes the .py and _wrap.cxx generated SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${ADDITIONAL_MAKE_CLEAN_FILES};${mskccRobot_BINARY_DIR}/mskccRobotPython.py;${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/mskccRobotPython.py;${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/mskccRobotPython.pyc;mskccRobotPython_wrap.cxx") # # $Log: CMakeLists.txt,v $ # Revision 1.5 2006/07/13 04:47:56 pkaz # Updated for current version of cisst libraries. # # Revision 1.4 2005/01/24 22:59:42 pkaz # Added copy of .py files as CUSTOM_COMMAND # # Revision 1.3 2005/01/20 05:15:56 pkaz # Updated for Swig 1.3.24. # # Revision 1.2 2005/01/07 22:38:04 pkaz # Added Python debug library. # # Revision 1.1 2004/10/27 15:55:54 anton # Added CMakeLists.txt files and minor modifications to compile the code. # #