summaryrefslogtreecommitdiffstats
path: root/app/CMakeLists.txt
diff options
context:
space:
mode:
authorLoïc Collignon <loic.collignon@iot.bzh>2018-07-02 15:38:32 +0200
committerLoïc Collignon <loic.collignon@iot.bzh>2018-07-10 19:21:41 +0200
commitc56b75f6511015edb4417df81d97aa6181e5480e (patch)
tree81fc62d2d341b518b1f9639c3eb862b67c4252c1 /app/CMakeLists.txt
parentaf3fc263d66cb981e2ca159109d8c2edf1b89e09 (diff)
Allow to build and run on native linux host
Make libhomescreen and libmanager dependencies optional so that you can build, run and debug on a native linux host, to allow faster development. Change-Id: Ice0b7e196e9a88dc7f0f8e9894eb9091c6ba566e Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'app/CMakeLists.txt')
-rw-r--r--app/CMakeLists.txt18
1 files changed, 12 insertions, 6 deletions
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 8f8bd1e..25da122 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -25,6 +25,12 @@ qt5_add_resources(RESOURCES Mixer.qrc)
PROJECT_TARGET_ADD(mixer)
+option(NATIVE_BUILD "Build for native environment, without homescreen and window manager" OFF)
+if(NATIVE_BUILD)
+ message(STATUS "Native build is ON")
+ add_definitions(-DNATIVE_BUILD)
+endif()
+
add_executable(mixer
main.cpp
mixer.cpp
@@ -49,9 +55,9 @@ target_link_libraries(mixer
afb-helpers
)
-#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/)
+if(NOT NATIVE_BUILD)
+ target_link_libraries(mixer
+ homescreen
+ qtWindowmanagerWrapper
+ )
+endif()