From c56b75f6511015edb4417df81d97aa6181e5480e Mon Sep 17 00:00:00 2001 From: Loïc Collignon Date: Mon, 2 Jul 2018 15:38:32 +0200 Subject: Allow to build and run on native linux host MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- app/CMakeLists.txt | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'app/CMakeLists.txt') 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() -- cgit 1.2.3-korg