Created
February 12, 2014 02:02
-
-
Save rgoulter/8948619 to your computer and use it in GitHub Desktop.
CS3249 Lab1 CMake (Qt4)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.8) | |
PROJECT(myeditor) | |
FIND_PACKAGE(Qt4 REQUIRED) | |
SET(CMAKE_EXPORT_COMPILE_COMMANDS ON) | |
SET(myeditor_SOURCES main.cpp MyEditor.cpp) | |
SET(myeditor_HEADERS MyEditor.h) | |
SET(myeditor_RESOURCES myeditor.qrc) | |
QT4_WRAP_CPP(myeditor_HEADERS_MOC ${myeditor_HEADERS}) | |
QT4_ADD_RESOURCES(myeditor_RESOURCES_RCC ${myeditor_RESOURCES}) | |
INCLUDE(${QT_USE_FILE}) | |
ADD_DEFINITIONS(${QT_DEFINITIONS}) | |
# Set some Win32 Specific Settings | |
IF(WIN32) | |
SET(GUI_TYPE WIN32) | |
ENDIF(WIN32) | |
# Set some Apple MacOS Specific settings | |
IF (APPLE) | |
SET(GUI_TYPE MACOSX_BUNDLE) | |
ENDIF (APPLE) | |
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) | |
ADD_EXECUTABLE(myeditor ${GUI_TYPE} | |
${myeditor_SOURCES} | |
${myeditor_HEADERS_MOC} | |
${myeditor_RESOURCES_RCC}) | |
TARGET_LINK_LIBRARIES(myeditor ${QT_LIBRARIES}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment