Skip to content
This repository
tree: 76a327a8d2
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 57 lines (46 sloc) 1.973 kb
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
SET(PLUGIN_NAME kovan_serial_interface)

PROJECT(${PLUGIN_NAME})
cmake_minimum_required(VERSION 2.6.0)

IF(APPLE)
SET(CMAKE_OSX_SYSROOT "${OSX_DEVELOPER_ROOT}/SDKs/MacOSX10.6.sdk")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -g")
ENDIF(APPLE)

FIND_PACKAGE(Qt4 REQUIRED)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${QT_INCLUDE_DIR} ${KISS_INCLUDE_DIRS} ../shared)

INCLUDE(${QT_USE_FILE})

FILE(GLOB LOCAL_INCLUDES *.hpp ../shared/*.hpp)
FILE(GLOB LOCAL_SOURCES *.cpp ../shared/*.cpp)

QT4_WRAP_CPP(INCLUDES_MOC ${LOCAL_INCLUDES})

ADD_DEFINITIONS(${QT_DEFINITIONS})
ADD_DEFINITIONS(-DQT_PLUGIN)
ADD_DEFINITIONS(-DQT_DEBUG)
ADD_DEFINITIONS(-DQT_SHARED)
ADD_DEFINITIONS(-DQT_DLL)

ADD_LIBRARY(${PLUGIN_NAME} SHARED ${LOCAL_SOURCES} ${INCLUDES_MOC})
LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH})

TARGET_LINK_LIBRARIES(${PLUGIN_NAME} kisside pcompiler kovanserial kar ${QT_LIBRARIES})

IF(APPLE)
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -headerpad_max_install_names")
ADD_CUSTOM_TARGET(${PLUGIN_NAME}_osx_install_names ALL
COMMAND ${OSX_INSTALL_NAMES_SCRIPT} lib${PLUGIN_NAME}.dylib
QtCore.framework/Versions/4/QtCore
QtScript.framework/Versions/4/QtScript
QtDBus.framework/Versions/4/QtDBus
QtGui.framework/Versions/4/QtGui
QtNetwork.framework/Versions/4/QtNetwork
QtXml.framework/Versions/4/QtXml
QtXmlPatterns.framework/Versions/4/QtXmlPatterns
QtSvg.framework/Versions/4/QtSvg
QtSql.framework/Versions/4/QtSql
QtWebKit.framework/Versions/4/QtWebKit
phonon.framework/Versions/4/phonon
QtDeclarative.framework/Versions/4/QtDeclarative
libkar.dylib
libpcompiler.dylib
WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH}
DEPENDS ${PLUGIN_NAME})
INSTALL(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION ${EXECUTABLE_OUTPUT_PATH}/KISS.app/Contents/interfaces)
ELSE(APPLE)
INSTALL(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION ${EXECUTABLE_OUTPUT_PATH}/interfaces
RUNTIME DESTINATION ${EXECUTABLE_OUTPUT_PATH}/interfaces)
ENDIF(APPLE)
Something went wrong with that request. Please try again.