Mercurial > malikania
view cmake/MalikaniaOptions.cmake @ 52:4bc4732fa1dd
Client: add basic button, closes #601
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 15 Dec 2016 13:46:46 +0100 |
parents | 697bf85e8e19 |
children | 0edaba9986ba |
line wrap: on
line source
# # CMakeLists.txt -- CMake build system for malikania # # Copyright (c) 2013-2016 Malikania Authors # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # # # Fakeroot directory. # ------------------------------------------------------------------- # # This option specifies where to build the project as it would be installed # using the install target or installers. # # This helps development. # set(WITH_FAKEROOT_DIR "${CMAKE_BINARY_DIR}/fakeroot" CACHE STRING "Where to build project as it would be installed") # # Backend selection. # ------------------------------------------------------------------- # # The following options are available: # WITH_BACKEND - Type of backend to use. (Default: SDL) # set(WITH_BACKEND "SDL" CACHE STRING "Which backend to use") # # Documentation and technical references # ------------------------------------------------------------------- # # The following options are available: # WITH_DOCS - Disable or enable all docs, if set to Off, disable all documentation. # WITH_DOXYGEN - Enable doxygen # option(WITH_DOCS "Build all documentation" On) option(WITH_DOXYGEN "Enable doxygen generation" On) if (NOT WITH_DOCS) set(WITH_DOXYGEN Off) endif () set(WITH_DRIVERDIR "lib/malikania/${MALIKANIA_VERSION}" CACHE STRING "Database driver directory") set(WITH_BINDIR "libexec/malikania/${MALIKANIA_VERSION}" CACHE STRING "Front end directory") if (IS_ABSOLUTE ${WITH_DRIVERDIR}) message(FATAL_ERROR "WITH_DRIVERDIR must not be absolute") elseif (IS_ABSOLUTE ${WITH_BINDIR}) message(FATAL_ERROR "WITH_BINDIR must not be absolute") endif () # # Options for unit tests # ------------------------------------------------------------------- # set(WITH_TEST_PGSQL_HOST "localhost" CACHE STRING "Hostname for PostgreSQL driver") set(WITH_TEST_PGSQL_PORT "5432" CACHE STRING "Port for PostgreSQL driver") set(WITH_TEST_PGSQL_DATABASE "malikaniadb" CACHE STRING "Database for PostgreSQL driver") set(WITH_TEST_PGSQL_USER "malikania" CACHE STRING "Username for PostgreSQL driver") # # Targets to build # ------------------------------------------------------------------- # # The following options are available: # WITH_LIBCLIENT - Build the client library. # WITH_LIBSERVER - Build the server library. # option(WITH_LIBCLIENT "Build libclient" On) option(WITH_LIBSERVER "Build libserver" On) if (WITH_BACKEND MATCHES "SDL") set(WITH_BACKEND_DIR "backend/sdl") else () message(FATAL_ERROR "Unknown backend selected: ${WITH_BACKEND}") endif () configure_file( ${malikania_SOURCE_DIR}/cmake/internal/sysconfig-tests.h ${malikania_BINARY_DIR}/sysconfig-tests.h )