diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-09-14 18:35:41 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-10-10 10:53:47 +0200 |
commit | c2271569bf1dd72b5fe6aaa110328dc0850c2088 (patch) | |
tree | ef84d49f954bc866e4b41cbeb5c591edfdb78000 /afm-test.cmake | |
parent | bc69040626197b2bd7a9e05cf751f2d3ef2c083e (diff) |
Script for both native and target launch
Change-Id: I57ac01794ea92e235cb105acb22ab44f5566268b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'afm-test.cmake')
-rw-r--r-- | afm-test.cmake | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/afm-test.cmake b/afm-test.cmake index 4162188..7a73f10 100644 --- a/afm-test.cmake +++ b/afm-test.cmake @@ -16,11 +16,10 @@ # limitations under the License. ########################################################################### -#INSTALL(PROGRAMS afm-test DESTINATION ${CMAKE_INSTALL_BINDIR}) -PROJECT_TARGET_ADD(afm-test-script) +if("${OSRELEASE}" STREQUAL "poky-agl" OR "${OSRELEASE}" STREQUAL "yocto-build") + set(AFM_TEST "afm-test.target.sh") +else() + set(AFM_TEST "afm-test.native.sh") +endif() -add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/afm-test - COMMAND install -m 775 ${CMAKE_CURRENT_SOURCE_DIR}/afm-test ${CMAKE_CURRENT_BINARY_DIR}/afm-test -) - -add_custom_target(${TARGET_NAME} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/afm-test) +install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/${AFM_TEST} DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME afm-test) |