Skip to content

Instantly share code, notes, and snippets.

@candycode
Created November 13, 2012 08:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save candycode/4064687 to your computer and use it in GitHub Desktop.
Save candycode/4064687 to your computer and use it in GitHub Desktop.
Qt + Python CMake config
cmake_minimum_required(VERSION 2.8)
project(qpy)
#Qt
find_package(Qt4 REQUIRED QtCore)
include(${QT_USE_FILE})
#Python
find_package(PythonLibs)
include_directories( ${PYTHON_INCLUDE_DIRS} ${QT_INCLUDES} )
message( ${QT_INCLUDES} )
message( ${QT_LIBRARIES} )
message( ${PYTHON_INCLUDE_DIRS} )
message( ${PYTHON_LIBRARIES} )
#test app
set( MOC_HEADERS TestObject.h )
QT4_WRAP_CPP( MOC_SRCS ${MOC_HEADERS} )
add_executable( qscratch qscratch.cpp ${MOC_SRCS} ${MOC_HEADERS} )
target_link_libraries( qscratch ${PYTHON_LIBRARIES} ${QT_LIBRARIES} )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment