util.h and its impl are now c++
[staging/windowmanager.git] / src / CMakeLists.txt
index aa1c2a0..2b81367 100644 (file)
@@ -1,13 +1,11 @@
-wlproto(IVI_APP ivi-application)
 wlproto(IVI_CON ivi-controller)
 
 add_executable(winman
    main.cpp
    wayland.cpp
    wayland.hpp
-   util.c
-   util.h
-   ${IVI_APP_PROTO}
+   util.cpp
+   util.hpp
    ${IVI_CON_PROTO})
 
 target_compile_definitions(winman
@@ -15,18 +13,24 @@ target_compile_definitions(winman
         WINMAN_VERSION_STRING="${PACKAGE_VERSION}"
         _GNU_SOURCE)  # XXX should I define this here?!
 
+if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
+   target_compile_definitions(winman
+       PRIVATE
+           _GLIBCXX_DEBUG)
+endif()
+
 target_compile_options(winman
     PRIVATE
         -Wall -Wextra -Wno-unused-parameter -Wno-comment)
 
 set_target_properties(winman
     PROPERTIES
+        INTERPROCEDURAL_OPTIMIZATION ON
+
         CXX_EXTENSIONS OFF
         CXX_STANDARD 14
-        CXX_STANDARD_REQUIRED ON)
+        CXX_STANDARD_REQUIRED ON
 
-set_target_properties(winman
-    PROPERTIES
         C_EXTENSIONS OFF
         C_STANDARD 99
         C_STANDARD_REQUIRED ON)