summaryrefslogtreecommitdiffstats
path: root/app/CMakeLists.txt
diff options
context:
space:
mode:
authorLoïc Collignon <loic.collignon@iot.bzh>2018-03-27 14:29:57 +0200
committerLoïc Collignon <loic.collignon@iot.bzh>2018-06-14 11:37:08 +0200
commitf35abba1772c8b9e38dd51b3dd09bc185cef90fd (patch)
tree34d33811aa0c6d2c0231c5f45c2f0f09fb70cc6f /app/CMakeLists.txt
parent6bf2ccbd72176a8cbdfb3cdb2c15ee1c2db594b8 (diff)
make of use of app templates to import right HALs depending on compilation options
Change-Id: I0f864b3a0bf4ee5527c6d32578990033f6707208 Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'app/CMakeLists.txt')
-rw-r--r--app/CMakeLists.txt57
1 files changed, 57 insertions, 0 deletions
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
new file mode 100644
index 0000000..034d233
--- /dev/null
+++ b/app/CMakeLists.txt
@@ -0,0 +1,57 @@
+###########################################################################
+# Copyright 2018 IoT.bzh
+#
+# author: Loïc Collignon <loic.collignon@iot.bzh>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###########################################################################
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_CXX_STANDARD 14)
+
+find_package(Qt5QuickControls2)
+find_package(Qt5WebSockets)
+
+PROJECT_TARGET_ADD(mixer)
+
+add_executable(mixer
+ main.cpp
+ mixer.cpp
+ qafbwsclient.cpp
+ qafbwsmsg.cpp
+)
+
+set_target_properties(mixer PROPERTIES
+ LABELS "EXECUTABLE"
+ PREFIX ""
+ COMPILE_FLAGS "${EXTRAS_CFLAGS} -DFOR_AFB_BINDING"
+ LINK_FLAGS "${BINDINGS_LINK_FLAG}"
+ LINK_LIBRARIES "${EXTRAS_LIBRARIES}"
+ OUTPUT_NAME "${TARGET_NAME}"
+)
+
+target_link_libraries(mixer
+ Qt5::QuickControls2
+ Qt5::WebSockets
+ homescreen
+ qtWindowmanagerWrapper
+ json-c
+)
+
+#add_custom_command(TARGET ${TARGET_NAME}
+#PRE_BUILD
+#COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/../package/htdocs
+#COMMAND cp -rv ${CMAKE_CURRENT_SOURCE_DIR}/../htdocs ${CMAKE_CURRENT_BINARY_DIR}/../package/
+#COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/../package/etc
+#COMMAND cp -rv ${CMAKE_CURRENT_SOURCE_DIR}/../etc ${CMAKE_CURRENT_BINARY_DIR}/../package/)