CMakeLists.txt 3.44 KB
#=============================================================================
# CMakeLists.txt - Rules for coolbot toolkit library.
#
# The CoolBOT Project (<http://www.coolbotproject.org>)
# Copyright (C) 2003,2007,2009,2010
#    Universidad de Las Palmas de Gran Canaria (ULPGC) (<http://www.ulpgc.es>)
#
#    This software is a collective project which has been designed, developed and
#    written, and is maintained by members, students and collaborators of the División
#    de Inteligencia Artificial y Sistemas (DIAS) at the Instituto Universitario de
#    Sistemas Inteligentes y Aplicaciones Numéricas en Ingeniería (SIANI)
#    (<http://www.siani.es/>), and also of the Departamento de Informática y Sistemas
#    (DIS) (<http://www.dis.ulpgc.es>) both at ULPGC. The AUTHOR file lists all
#    developers and contributors.The particular authors of each file are explicitly
#    specified on each one of them.
#
# This file is part of the CoolBOT Project.
# The CoolBOT Project is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or any
# later version.
#
# The CoolBOT Project is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy (COPYING file) of the GNU General Public License
# along with the CoolBOT Project. If not, see <http://www.gnu.org/licenses/>.
#
# In addition to the GNU General Public License, the CoolBOT Project Compiler License
# Exception is applicable to the C++ skeletons generated by the CoolBOT Compiler
# (coolbot-c). The purpose of this Exception is to allow distribution of  CoolBOT
# Compiler's (coolbot-c) typical output under terms of the recipient's choice
# (including proprietary). You should have received a copy of the CoolBOT Project
# Compiler License Exception (COPYING.EXCEPTION file) along with the CoolBOT Project.
# If not see <http://www.coolbotproject.org>.
#=============================================================================
MESSAGE(STATUS "Generating coolbot-toolkit target")

INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/coolbot-toolkit)

SET(COOLBOT_TOOLKIT_SRCS
    ctDir.cpp
    ctEnv.cpp
    ctFile.cpp
    ctFileName.cpp
    ctLog.cpp
    ctString.cpp
    ctTemplate.cpp
  )

SET(COOLBOT_TOOLKIT_HDRS
    ctDir.h
    ctEnv.h
    ctFile.h
    ctFileName.h
    ctLog.h
    ctString.h
    ctTemplate.h
  )

IF(WIN32)
  #
  # Problem in MS-Windows with flex and bison(binaries packages).
  # By default, these tools need the header: unistd.h
  #
  MESSAGE(STATUS "  * WARNING: In Ms-Windows, flex and bison need the header: unistd.h")
  MESSAGE(STATUS "  * Try to generate the unistd.h")
  CONFIGURE_FILE(
    ${PROJECT_SOURCE_DIR}/cmake/unistd.h.in
    ${PROJECT_SOURCE_DIR}/coolbot-toolkit/unistd.h
  )
  MESSAGE(STATUS "  * The unistd.h header has been generated")
  SET(COOLBOT_TOOLKIT_HDRS ${COOLBOT_TOOLKIT_HDRS} unistd.h)
ENDIF(WIN32)

SET(COOLBOT_TOOLKIT_SRCS
    ${COOLBOT_TOOLKIT_SRCS}
    ${COOLBOT_TOOLKIT_HDRS}
  )

IF(SHOW_DEBUG_INFO)
  MESSAGE(STATUS "  * Source code:")
  MESSAGE("${COOLBOT_TOOLKIT_SRCS}")
ENDIF(SHOW_DEBUG_INFO)

ADD_LIBRARY(coolbot-toolkit STATIC ${COOLBOT_TOOLKIT_SRCS})

REGISTER_NEW_TARGET("coolbot-toolkit")
MESSAGE(STATUS "  * Created coolbot-toolkit target")