~townsend/compiz/fix-auto-vp-switch-0.9.10

« back to all changes in this revision

Viewing changes to compizconfig/ccsm/CMakeLists.txt

  • Committer: Sam Spilsbury
  • Date: 2012-10-16 13:53:20 UTC
  • mto: This revision was merged to the branch mainline in revision 3434.
  • Revision ID: sam.spilsbury@canonical.com-20121016135320-3zb8wy8u16eayb7m
Clean up the CMake code around the python modules and uninstalling
 - It isn't possible to build python extensions using distutils that
   link to things that we are building, because CMake provides no
   means for a custom command to depend on a library. Build them
   using CMake directly instead
 - Clean up the tests: the tests depended on having a working opengl
   and core plugin xml file and were also sensitive to xml data. Make
   a mock.xml and use that instead
 - Require ini for the compizconfig-python tests. They won't run without it
 - Fix the uninstall scripts. We were clobbering the uninstall target
   with the python uninstall targets, that is just plain wrong. Created
   a new cmake function to append custom uninstall scripts to the global
   uninstall script

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
add_custom_target (ccsm_module ALL DEPENDS
44
44
                   ${PY_CCSM_LIB})
45
45
 
46
 
add_custom_target (uninstall
47
 
                   COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py uninstall --prefix=${CMAKE_INSTALL_PREFIX}
48
 
                   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
49
 
                   COMMENT "Uninstalling Python Files")
 
46
set (UNINSTALL_COMMAND "python ${CMAKE_CURRENT_SOURCE_DIR}/setup.py uninstall --prefix=${CMAKE_INSTALL_PREFIX} --version=${VERSION}")
 
47
 
 
48
compiz_add_code_to_uninstall_target (${UNINSTALL_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR})
50
49
 
51
50
install (CODE
52
51
         "message (\"Installing python files\")