Skip to content

Instantly share code, notes, and snippets.

@jrabbit
Created October 26, 2010 20:59
Show Gist options
  • Select an option

  • Save jrabbit/647790 to your computer and use it in GitHub Desktop.

Select an option

Save jrabbit/647790 to your computer and use it in GitHub Desktop.
project(plugins)
set(ui_plugin_src
customwidgets.cpp
customwidget.cpp
)
set (ui_plugin_moc
customwidget.h
customwidgets.h
)
QT4_WRAP_CPP(MOC_FILES ${ui_plugin_moc})
include_directories(${QT_QTDESIGNER_INCLUDE_DIR}
${QT_QTUITOOLS_INCLUDE_DIR}
${SHIBOKEN_INCLUDE_DIR}
${PYTHON_INCLUDE_PATH})
add_library(uiplugin STATIC ${ui_plugin_src} ${MOC_FILES})
add_definitions(-fPIC)
add_definitions(-DQT_STATICPLUGIN)
target_link_libraries(uiplugin
${QT_QTDESIGNER_LIBRARY}
${QT_QTUITOOLS_LIBRARY}
${SHIBOKEN_LIBRARY}
${PYTHON_LIBRARY})
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(LIBRARY_OUTPUT_SUFFIX ${CMAKE_DEBUG_POSTFIX})
else()
set(LIBRARY_OUTPUT_SUFFIX ${CMAKE_RELEASE_POSTFIX})
endif()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment