summaryrefslogtreecommitdiffstats
path: root/afm-test.cmake
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-09-14 18:35:41 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-09-25 16:35:16 +0200
commit3db71f8774af1e1553e1b5a85ab62e210889dbe1 (patch)
tree5f39ad6d1fd2f76fa53d4fda58f5fa0ea33e8d37 /afm-test.cmake
parent7608c49be21ae194a4600a053ffc4806164fb578 (diff)
Script for both native and target launch
Change-Id: I975c6c8e5eb41d7197ee7992762799b72d7bcb41 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'afm-test.cmake')
-rw-r--r--afm-test.cmake13
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)