# <license>
# 
# Controller v2.1
# 
# This software is provided to enhance knowledge and encourage progress in the scientific
# community. It should be used only for research and educational purposes. Any reproduction
# or use for commercial purpose, public redistribution, in source or binary forms, with or 
# without modifications, is NOT ALLOWED without the previous authorization of the copyright 
# holder. The origin of this software must not be misrepresented; you must not claim that you
# wrote the original software. If you use this software for any purpose (e.g. publication),
# a reference to the software package and the authors must be included.
# 
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
# THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 
# Copyright (c) 2007-2020, Trasgo Group, Universidad de Valladolid.
# All rights reserved.
# 
# More information on http://trasgo.infor.uva.es/
# 
# </license>
cmake_minimum_required (VERSION 2.6)

# Compilation verbose info
if (CTRL_CMAKE_VERBOSE_EXAMPLES)
    set(CTRL_CMAKE_VERBOSE_EXAMPLES_HOTSPOT ON)
    set(CTRL_CMAKE_VERBOSE_EXAMPLES_MATRIX_POWER ON)
    set(CTRL_CMAKE_VERBOSE_EXAMPLES_SOBEL_YUV ON)
    set(CTRL_CMAKE_VERBOSE_EXAMPLES_CELL_AUTOM ON)
endif (CTRL_CMAKE_VERBOSE_EXAMPLES)

set(CTRL_EXAMPLES_EXP_MODE ON) # Output on json format

set(CTRL_LIBS ${CTRL_LIBS} Ctrl)

if(SUPPORT_FPGA)
    #final '/' in the path must be kept in order for the compilation to work (strcat in Ctrl_FPGA_KernelProto.h)
    set(KERNELS_PATH ${PROJECT_SOURCE_DIR}/kernels)
    set(CTRL_KERNELS_PATH_FPGA ${PROJECT_SOURCE_DIR}/kernels/FPGA/Ctrl/)
    set(REF_KERNELS_PATH_FPGA ${PROJECT_SOURCE_DIR}/kernels/FPGA/Ref/)
endif(SUPPORT_FPGA)

# Add examples
add_subdirectory(hotspot)
add_subdirectory(matrix-pow)
add_subdirectory(sobel-yuv)
