# # Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved # # Contact: Dariusz Michaluk (d.michaluk@samsung.com) # # 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. # # # @file CMakeLists.txt # @author Dariusz Michaluk (d.michaluk@samsung.com) # MESSAGE(STATUS "") MESSAGE(STATUS "Generating makefile for the Yaca system tests...") FILE(GLOB yaca_test_SRCS *.cpp) ## Setup target ################################################################ SET(YACA_TEST "yaca-test") ADD_EXECUTABLE(${YACA_TEST} ${yaca_test_SRCS}) ADD_CUSTOM_TARGET(copy-test-vectors ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/test-vectors ${CMAKE_CURRENT_BINARY_DIR}/test-vectors DEPENDS ${YACA_TEST}) IF(NOT DEFINED YACA_TEST_DIR) SET(YACA_TEST_DIR "${SHARE_INSTALL_PREFIX}/${YACA_TEST}") ENDIF(NOT DEFINED YACA_TEST_DIR) ADD_DEFINITIONS("-DYACA_TEST_DIR=\"${YACA_TEST_DIR}\"") MESSAGE(STATUS "YACA_TEST_DIR: ${YACA_TEST_DIR}") ## Link libraries ############################################################## PKG_CHECK_MODULES(YACA_TEST_DEPS REQUIRED yaca) FIND_PACKAGE (Threads) INCLUDE_DIRECTORIES(SYSTEM ${YACA_TEST_DEPS_INCLUDE_DIRS}) TARGET_LINK_LIBRARIES(${YACA_TEST} ${YACA_TEST_DEPS_LIBRARIES} dpl-test-framework ${CMAKE_THREAD_LIBS_INIT}) ## Install ##################################################################### INSTALL(TARGETS ${YACA_TEST} DESTINATION bin) INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test-vectors DESTINATION ${YACA_TEST_DIR})