~ubuntu-branches/ubuntu/wily/qtbase-opensource-src/wily

« back to all changes in this revision

Viewing changes to tests/auto/cmake/test_qtmainwin_library/CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 12:46:17 UTC
  • Revision ID: package-import@ubuntu.com-20130205124617-c8jouts182j002fx
Tags: upstream-5.0.1+dfsg
ImportĀ upstreamĀ versionĀ 5.0.1+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
cmake_minimum_required(VERSION 2.8)
 
3
 
 
4
project(test_qtmainwin_library)
 
5
 
 
6
find_package(Qt5Core REQUIRED)
 
7
 
 
8
include_directories(${Qt5Core_INCLUDE_DIRS})
 
9
 
 
10
add_definitions(${Qt5Core_DEFINITIONS})
 
11
 
 
12
qt5_wrap_cpp(moc_files myobject.h)
 
13
 
 
14
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")
 
15
 
 
16
# On non-windows, the WIN32 is harmless, and Qt5Core_QTMAIN_LIBRARIES is empty.
 
17
# We test that it is harmless on those, and test that it builds on Windows.
 
18
# It wouldn't build if WIN32 is used and Qt5Core_QTMAIN_LIBRARIES is empty.
 
19
add_executable(myobject WIN32 myobject.cpp ${moc_files} )
 
20
target_link_libraries(myobject ${Qt5Core_LIBRARIES} ${Qt5Core_QTMAIN_LIBRARIES})