diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-04-11 14:23:27 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-04-11 14:23:27 (GMT) |
commit | 94f40300e8ca9d181a15a03725525bc498f8465d (patch) | |
tree | a34fba2a4cbd12ecbcf4adb757f15f0888e013f4 /Tests/X11 | |
parent | ee867fb1b2a8117baffeb497b99b84b5c8dcb72d (diff) | |
download | CMake-94f40300e8ca9d181a15a03725525bc498f8465d.zip CMake-94f40300e8ca9d181a15a03725525bc498f8465d.tar.gz CMake-94f40300e8ca9d181a15a03725525bc498f8465d.tar.bz2 |
ENH: add a simple x11 test for packaging
Diffstat (limited to 'Tests/X11')
-rw-r--r-- | Tests/X11/CMakeLists.txt | 11 | ||||
-rw-r--r-- | Tests/X11/HelloWorldX11.cxx | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/Tests/X11/CMakeLists.txt b/Tests/X11/CMakeLists.txt index 28b41ed..52f4a6f 100644 --- a/Tests/X11/CMakeLists.txt +++ b/Tests/X11/CMakeLists.txt @@ -1,6 +1,6 @@ # a simple C only test case cmake_minimum_required (VERSION 2.6) -PROJECT (UseX11 C) +PROJECT (UseX11 CXX C) INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake) MESSAGE("X11_FOUND: ${X11_FOUND}") @@ -23,4 +23,13 @@ IF(X11_FOUND) ADD_DEFINITIONS(-DCMAKE_HAS_X) INCLUDE_DIRECTORIES(${X11_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(UseX11 ${X11_LIBRARIES}) + IF(APPLE) + ADD_EXECUTABLE(HelloWorldX11 HelloWorldX11.cxx) + TARGET_LINK_LIBRARIES(HelloWorldX11 ${X11_LIBRARIES}) + install( TARGETS HelloWorldX11 DESTINATION bin) + # build a CPack driven installer package + set(CPACK_PACKAGE_NAME HelloWorldX11Package) + set(CPACK_PACKAGE_EXECUTABLES HelloWorldX11 HelloWorldX11) + include(CPack) + ENDIF(APPLE) ENDIF(X11_FOUND) diff --git a/Tests/X11/HelloWorldX11.cxx b/Tests/X11/HelloWorldX11.cxx index 7b18e20..5bbc19a 100644 --- a/Tests/X11/HelloWorldX11.cxx +++ b/Tests/X11/HelloWorldX11.cxx @@ -72,7 +72,7 @@ Main::Main (int argc, char * const argv[]) { init_x(); // event loop - while(TRUE) { + while(1) { // get the next event and stuff it into our event variable. // Note: only events we set the mask for are detected! XNextEvent(dis, &event); |