summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Tests/X11/CMakeLists.txt11
-rw-r--r--Tests/X11/HelloWorldX11.cxx2
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);