mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-25 16:26:18 +00:00
Update: #842 Initial file/folder move for single project build.
This commit is contained in:
parent
b1854065cf
commit
72b6fb118b
40 changed files with 0 additions and 1610 deletions
|
@ -1,51 +0,0 @@
|
|||
# - Locate CEGUI library
|
||||
# This module defines
|
||||
# CEGUI_LIBRARY, the library to link against
|
||||
# CEGUI_FOUND, if false, do not try to link to CEGUI
|
||||
# CEGUI_INCLUDE_DIRS, where to find headers.
|
||||
|
||||
IF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
|
||||
# in cache already
|
||||
SET(CEGUI_FIND_QUIETLY TRUE)
|
||||
ENDIF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
|
||||
|
||||
|
||||
FIND_PATH(CEGUI_INCLUDE_DIRS
|
||||
CEGUI
|
||||
PATHS
|
||||
$ENV{CEGUI_DIR}/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
/opt/csw/include
|
||||
/opt/include
|
||||
PATH_SUFFIXES cegui CEGUI
|
||||
)
|
||||
|
||||
FIND_LIBRARY(CEGUI_LIBRARY
|
||||
NAMES CEGUIBase
|
||||
PATHS
|
||||
$ENV{CEGUI_DIR}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/local/X11R6/lib
|
||||
/usr/X11R6/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
IF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
|
||||
SET(CEGUI_FOUND "YES")
|
||||
SET(CEGUI_INCLUDE_DIRS "${CEGUI_INCLUDE_DIRS}/CEGUI")
|
||||
IF(NOT CEGUI_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found CEGUI: ${CEGUI_LIBRARY}")
|
||||
ENDIF(NOT CEGUI_FIND_QUIETLY)
|
||||
ELSE(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
|
||||
IF(NOT CEGUI_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Warning: Unable to find CEGUI!")
|
||||
ENDIF(NOT CEGUI_FIND_QUIETLY)
|
||||
ENDIF(CEGUI_LIBRARY AND CEGUI_INCLUDE_DIRS)
|
|
@ -1,51 +0,0 @@
|
|||
#
|
||||
# Find the CppUnit includes and library
|
||||
#
|
||||
# This module defines
|
||||
# CPPUNIT_INCLUDE_DIR, where to find tiff.h, etc.
|
||||
# CPPUNIT_LIBRARY, where to find the CppUnit library.
|
||||
# CPPUNIT_FOUND, If false, do not try to use CppUnit.
|
||||
|
||||
# also defined, but not for general use are
|
||||
IF(CPPUNIT_LIBRARY AND CPPUNIT_INCLUDE_DIR)
|
||||
# in cache already
|
||||
SET(CPPUNIT_FIND_QUIETLY TRUE)
|
||||
ENDIF(CPPUNIT_LIBRARY AND CPPUNIT_INCLUDE_DIR)
|
||||
|
||||
FIND_PATH(CPPUNIT_INCLUDE_DIR
|
||||
cppunit/TestCase.h
|
||||
PATHS
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
/opt/csw/include
|
||||
/opt/include
|
||||
PATH_SUFFIXES cppunit
|
||||
)
|
||||
|
||||
FIND_LIBRARY(CPPUNIT_LIBRARY
|
||||
cppunit
|
||||
PATHS
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/local/X11R6/lib
|
||||
/usr/X11R6/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
IF(CPPUNIT_LIBRARY AND CPPUNIT_INCLUDE_DIR)
|
||||
SET(CPPUNIT_FOUND "YES")
|
||||
IF(NOT CPPUNIT_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found CppUnit: ${CPPUNIT_LIBRARY}")
|
||||
ENDIF(NOT CPPUNIT_FIND_QUIETLY)
|
||||
ELSE(CPPUNIT_LIBRARY AND CPPUNIT_INCLUDE_DIR)
|
||||
IF(NOT CPPUNIT_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Warning: Unable to find CppUnit!")
|
||||
ENDIF(NOT CPPUNIT_FIND_QUIETLY)
|
||||
ENDIF(CPPUNIT_LIBRARY AND CPPUNIT_INCLUDE_DIR)
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
# - Locate FreeType library
|
||||
# This module defines
|
||||
# FREETYPE_LIBRARY, the library to link against
|
||||
# FREETYPE_FOUND, if false, do not try to link to FREETYPE
|
||||
# FREETYPE_INCLUDE_DIRS, where to find headers.
|
||||
|
||||
IF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
|
||||
# in cache already
|
||||
SET(FREETYPE_FIND_QUIETLY TRUE)
|
||||
ENDIF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
|
||||
|
||||
|
||||
FIND_PATH(FREETYPE_INCLUDE_DIRS
|
||||
freetype
|
||||
PATHS
|
||||
$ENV{FREETYPE_DIR}/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
/opt/csw/include
|
||||
/opt/include
|
||||
PATH_SUFFIXES freetype freetype2
|
||||
)
|
||||
|
||||
FIND_LIBRARY(FREETYPE_LIBRARY
|
||||
NAMES freetype libfreetype freetype219
|
||||
PATHS
|
||||
$ENV{FREETYPE_DIR}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/local/X11R6/lib
|
||||
/usr/X11R6/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
IF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
|
||||
SET(FREETYPE_FOUND "YES")
|
||||
IF(NOT FREETYPE_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found FreeType: ${FREETYPE_LIBRARY}")
|
||||
ENDIF(NOT FREETYPE_FIND_QUIETLY)
|
||||
ELSE(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
|
||||
IF(NOT FREETYPE_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Warning: Unable to find FreeType!")
|
||||
ENDIF(NOT FREETYPE_FIND_QUIETLY)
|
||||
ENDIF(FREETYPE_LIBRARY AND FREETYPE_INCLUDE_DIRS)
|
|
@ -1,453 +0,0 @@
|
|||
# - Try to find GTK2
|
||||
# Once done this will define
|
||||
#
|
||||
# GTK2_FOUND - System has Boost
|
||||
# GTK2_INCLUDE_DIRS - GTK2 include directory
|
||||
# GTK2_LIBRARIES - Link these to use GTK2
|
||||
# GTK2_LIBRARY_DIRS - The path to where the GTK2 library files are.
|
||||
# GTK2_DEFINITIONS - Compiler switches required for using GTK2
|
||||
#
|
||||
# Copyright (c) 2007 Andreas Schneider <mail@cynapses.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the New
|
||||
# BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#
|
||||
|
||||
set(GTK2_DEBUG ON)
|
||||
|
||||
macro(GTK2_DEBUG_MESSAGE _message)
|
||||
if (GTK2_DEBUG)
|
||||
message(STATUS "(DEBUG) ${_message}")
|
||||
endif (GTK2_DEBUG)
|
||||
endmacro(GTK2_DEBUG_MESSAGE _message)
|
||||
|
||||
if (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
|
||||
# in cache already
|
||||
set(GTK2_FOUND TRUE)
|
||||
else (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
|
||||
if (UNIX)
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
include(UsePkgConfig)
|
||||
|
||||
pkgconfig(gtk+-2.0 _GTK2IncDir _GTK2LinkDir _GTK2LinkFlags _GTK2Cflags)
|
||||
|
||||
find_path(GTK2_GTK_INCLUDE_DIR
|
||||
NAMES
|
||||
gtk/gtk.h
|
||||
PATHS
|
||||
$ENV{GTK2_HOME}
|
||||
${_GTK2IncDir}
|
||||
/usr/include/gtk-2.0
|
||||
/usr/local/include/gtk-2.0
|
||||
/opt/include/gtk-2.0
|
||||
/opt/gnome/include/gtk-2.0
|
||||
/sw/include/gtk-2.0
|
||||
)
|
||||
gtk2_debug_message("GTK2_GTK_INCLUDE_DIR is ${GTK2_GTK_INCLUDE_DIR}")
|
||||
|
||||
# Some Linux distributions (e.g. Red Hat) have glibconfig.h
|
||||
# and glib.h in different directories, so we need to look
|
||||
# for both.
|
||||
# - Atanas Georgiev <atanas@cs.columbia.edu>
|
||||
pkgconfig(glib-2.0 _GLIB2IncDir _GLIB2LinkDir _GLIB2LinkFlags _GLIB2Cflags)
|
||||
pkgconfig(gmodule-2.0 _GMODULE2IncDir _GMODULE2LinkDir _GMODULE2LinkFlags _GMODULE2Cflags)
|
||||
|
||||
find_path(GTK2_GLIBCONFIG_INCLUDE_DIR
|
||||
NAMES
|
||||
glibconfig.h
|
||||
PATHS
|
||||
${_GLIB2IncDir}
|
||||
${_GMODULE2IncDir}
|
||||
/opt/gnome/lib64/glib-2.0/include
|
||||
/opt/gnome/lib/glib-2.0/include
|
||||
/opt/lib/glib-2.0/include
|
||||
/usr/lib64/glib-2.0/include
|
||||
/usr/lib/glib-2.0/include
|
||||
/sw/lib/glib-2.0/include
|
||||
)
|
||||
gtk2_debug_message("GTK2_GLIBCONFIG_INCLUDE_DIR is ${GTK2_GLIBCONFIG_INCLUDE_DIR}")
|
||||
|
||||
find_path(GTK2_GLIB_INCLUDE_DIR
|
||||
NAMES
|
||||
glib.h
|
||||
PATHS
|
||||
${_GLIB2IncDir}
|
||||
${_GMODULE2IncDir}
|
||||
/opt/include/glib-2.0
|
||||
/opt/gnome/include/glib-2.0
|
||||
/usr/include/glib-2.0
|
||||
/sw/include/glib-2.0
|
||||
)
|
||||
gtk2_debug_message("GTK2_GLIB_INCLUDE_DIR is ${GTK2_GLIB_INCLUDE_DIR}")
|
||||
|
||||
pkgconfig(gdk-2.0 _GDK2IncDir _GDK2LinkDir _GDK2LinkFlags _GDK2Cflags)
|
||||
|
||||
find_path(GTK2_GDK_INCLUDE_DIR
|
||||
NAMES
|
||||
gdkconfig.h
|
||||
PATHS
|
||||
${_GDK2IncDir}
|
||||
/opt/gnome/lib/gtk-2.0/include
|
||||
/opt/gnome/lib64/gtk-2.0/include
|
||||
/opt/lib/gtk-2.0/include
|
||||
/usr/lib/gtk-2.0/include
|
||||
/usr/lib64/gtk-2.0/include
|
||||
/sw/lib/gtk-2.0/include
|
||||
)
|
||||
gtk2_debug_message("GTK2_GDK_INCLUDE_DIR is ${GTK2_GDK_INCLUDE_DIR}")
|
||||
|
||||
find_path(GTK2_GTKGL_INCLUDE_DIR
|
||||
NAMES
|
||||
gtkgl/gtkglarea.h
|
||||
PATHS
|
||||
${_GLIB2IncDir}
|
||||
/usr/include
|
||||
/usr/include/gtkgl-2.0
|
||||
/usr/local/include
|
||||
/usr/openwin/share/include
|
||||
/opt/gnome/include
|
||||
/opt/include
|
||||
/sw/include
|
||||
)
|
||||
gtk2_debug_message("GTK2_GTKGL_INCLUDE_DIR is ${GTK2_GTKGL_INCLUDE_DIR}")
|
||||
|
||||
pkgconfig(libglade-2.0 _GLADEIncDir _GLADELinkDir _GLADELinkFlags _GLADECflags)
|
||||
|
||||
find_path(GTK2_GLADE_INCLUDE_DIR
|
||||
NAMES
|
||||
glade/glade.h
|
||||
PATHS
|
||||
${_GLADEIncDir}
|
||||
/opt/gnome/include/libglade-2.0
|
||||
/usr/include/libglade-2.0
|
||||
/opt/include/libglade-2.0
|
||||
/sw/include/libglade-2.0
|
||||
)
|
||||
gtk2_debug_message("GTK2_GLADE_INCLUDE_DIR is ${GTK2_GLADE_INCLUDE_DIR}")
|
||||
|
||||
pkgconfig(pango _PANGOIncDir _PANGOLinkDir _PANGOLinkFlags _PANGOCflags)
|
||||
|
||||
find_path(GTK2_PANGO_INCLUDE_DIR
|
||||
NAMES
|
||||
pango/pango.h
|
||||
PATHS
|
||||
${_PANGOIncDir}
|
||||
/usr/include/pango-1.0
|
||||
/opt/gnome/include/pango-1.0
|
||||
/opt/include/pango-1.0
|
||||
/sw/include/pango-1.0
|
||||
)
|
||||
gtk2_debug_message("GTK2_PANGO_INCLUDE_DIR is ${GTK2_PANGO_INCLUDE_DIR}")
|
||||
|
||||
pkgconfig(cairo _CAIROIncDir _CAIROLinkDir _CAIROLinkFlags _CAIROCflags)
|
||||
|
||||
find_path(GTK2_CAIRO_INCLUDE_DIR
|
||||
NAMES
|
||||
cairo.h
|
||||
PATHS
|
||||
${_CAIROIncDir}
|
||||
/opt/gnome/include/cairo
|
||||
/usr/include
|
||||
/usr/include/cairo
|
||||
/opt/include
|
||||
/opt/include/cairo
|
||||
/sw/include
|
||||
/sw/include/cairo
|
||||
)
|
||||
gtk2_debug_message("GTK2_CAIRO_INCLUDE_DIR is ${GTK2_CAIRO_INCLUDE_DIR}")
|
||||
|
||||
pkgconfig(atk _ATKIncDir _ATKLinkDir _ATKLinkFlags _ATKCflags)
|
||||
|
||||
find_path(GTK2_ATK_INCLUDE_DIR
|
||||
NAMES
|
||||
atk/atk.h
|
||||
PATHS
|
||||
${_ATKIncDir}
|
||||
/opt/gnome/include/atk-1.0
|
||||
/usr/include/atk-1.0
|
||||
/opt/include/atk-1.0
|
||||
/sw/include/atk-1.0
|
||||
)
|
||||
gtk2_debug_message("GTK2_ATK_INCLUDE_DIR is ${GTK2_ATK_INCLUDE_DIR}")
|
||||
|
||||
find_library(GTK2_GTK_LIBRARY
|
||||
NAMES
|
||||
gtk-x11-2.0
|
||||
PATHS
|
||||
${_GTK2LinkDir}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/openwin/lib
|
||||
/usr/X11R6/lib
|
||||
/opt/gnome/lib
|
||||
/opt/lib
|
||||
/sw/lib
|
||||
)
|
||||
gtk2_debug_message("GTK2_GTK_LIBRARY is ${GTK2_GTK_LIBRARY}")
|
||||
|
||||
find_library(GTK2_GDK_LIBRARY
|
||||
NAMES
|
||||
gdk-x11-2.0
|
||||
PATHS
|
||||
${_GDK2LinkDir}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/openwin/lib
|
||||
/usr/X11R6/lib
|
||||
/opt/gnome/lib
|
||||
/opt/lib
|
||||
/sw/lib
|
||||
)
|
||||
gtk2_debug_message("GTK2_GDK_LIBRARY is ${GTK2_GDK_LIBRARY}")
|
||||
|
||||
find_library(GTK2_GDK_PIXBUF_LIBRARY
|
||||
NAMES
|
||||
gdk_pixbuf-2.0
|
||||
PATHS
|
||||
${_GDK2LinkDir}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/openwin/lib
|
||||
/usr/X11R6/lib
|
||||
/opt/gnome/lib
|
||||
/opt/lib
|
||||
/sw/lib
|
||||
)
|
||||
gtk2_debug_message("GTK2_GDK_PIXBUF_LIBRARY is ${GTK2_GDK_PIXBUF_LIBRARY}")
|
||||
|
||||
find_library(GTK2_GMODULE_LIBRARY
|
||||
NAMES
|
||||
gmodule-2.0
|
||||
PATHS
|
||||
${_GMODULE2LinkDir}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/openwin/lib
|
||||
/usr/X11R6/lib
|
||||
/opt/gnome/lib
|
||||
/opt/lib
|
||||
/sw/lib
|
||||
)
|
||||
gtk2_debug_message("GTK2_GMODULE_LIBRARY is ${GTK2_GMODULE_LIBRARY}")
|
||||
|
||||
find_library(GTK2_GTHREAD_LIBRARY
|
||||
NAMES
|
||||
gthread-2.0
|
||||
PATHS
|
||||
${_GTK2LinkDir}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/openwin/lib
|
||||
/usr/X11R6/lib
|
||||
/opt/gnome/lib
|
||||
/opt/lib
|
||||
/sw/lib
|
||||
)
|
||||
gtk2_debug_message("GTK2_GTHREAD_LIBRARY is ${GTK2_GTHREAD_LIBRARY}")
|
||||
|
||||
find_library(GTK2_GOBJECT_LIBRARY
|
||||
NAMES
|
||||
gobject-2.0
|
||||
PATHS
|
||||
${_GTK2LinkDir}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/openwin/lib
|
||||
/usr/X11R6/lib
|
||||
/opt/gnome/lib
|
||||
/opt/lib
|
||||
/sw/lib
|
||||
)
|
||||
gtk2_debug_message("GTK2_GOBJECT_LIBRARY is ${GTK2_GOBJECT_LIBRARY}")
|
||||
|
||||
find_library(GTK2_GLIB_LIBRARY
|
||||
NAMES
|
||||
glib-2.0
|
||||
PATHS
|
||||
${_GLIB2LinkDir}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/openwin/lib
|
||||
/usr/X11R6/lib
|
||||
/opt/gnome/lib
|
||||
/opt/lib
|
||||
/sw/lib
|
||||
)
|
||||
gtk2_debug_message("GTK2_GLIB_LIBRARY is ${GTK2_GLIB_LIBRARY}")
|
||||
|
||||
find_library(GTK2_GTKGL_LIBRARY
|
||||
NAMES
|
||||
gtkgl-2.0
|
||||
PATHS
|
||||
${_GTK2LinkDir}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/openwin/lib
|
||||
/usr/X11R6/lib
|
||||
/opt/gnome/lib
|
||||
/opt/lib
|
||||
/sw/lib
|
||||
)
|
||||
gtk2_debug_message("GTK2_GTKGL_LIBRARY is ${GTK2_GTKGL_LIBRARY}")
|
||||
|
||||
find_library(GTK2_GLADE_LIBRARY
|
||||
NAMES
|
||||
glade-2.0
|
||||
PATHS
|
||||
${_GLADELinkDir}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/openwin/lib
|
||||
/usr/X11R6/lib
|
||||
/opt/gnome/lib
|
||||
/opt/lib
|
||||
/sw/lib
|
||||
)
|
||||
gtk2_debug_message("GTK2_GLADE_LIBRARY is ${GTK2_GLADE_LIBRARY}")
|
||||
|
||||
find_library(GTK2_PANGO_LIBRARY
|
||||
NAMES
|
||||
pango-1.0
|
||||
PATHS
|
||||
${_PANGOLinkDir}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/openwin/lib
|
||||
/usr/X11R6/lib
|
||||
/opt/gnome/lib
|
||||
/opt/lib
|
||||
/sw/lib
|
||||
)
|
||||
gtk2_debug_message("GTK2_PANGO_LIBRARY is ${GTK2_PANGO_LIBRARY}")
|
||||
|
||||
find_library(GTK2_CAIRO_LIBRARY
|
||||
NAMES
|
||||
pangocairo-1.0
|
||||
PATHS
|
||||
${_CAIROLinkDir}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/openwin/lib
|
||||
/usr/X11R6/lib
|
||||
/opt/gnome/lib
|
||||
/opt/lib
|
||||
/sw/lib
|
||||
)
|
||||
gtk2_debug_message("GTK2_PANGO_LIBRARY is ${GTK2_CAIRO_LIBRARY}")
|
||||
|
||||
find_library(GTK2_ATK_LIBRARY
|
||||
NAMES
|
||||
atk-1.0
|
||||
PATHS
|
||||
${_ATKinkDir}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/openwin/lib
|
||||
/usr/X11R6/lib
|
||||
/opt/gnome/lib
|
||||
/opt/lib
|
||||
/sw/lib
|
||||
)
|
||||
gtk2_debug_message("GTK2_ATK_LIBRARY is ${GTK2_ATK_LIBRARY}")
|
||||
|
||||
set(GTK2_INCLUDE_DIRS
|
||||
${GTK2_GTK_INCLUDE_DIR}
|
||||
${GTK2_GLIBCONFIG_INCLUDE_DIR}
|
||||
${GTK2_GLIB_INCLUDE_DIR}
|
||||
${GTK2_GDK_INCLUDE_DIR}
|
||||
${GTK2_GLADE_INCLUDE_DIR}
|
||||
${GTK2_PANGO_INCLUDE_DIR}
|
||||
${GTK2_CAIRO_INCLUDE_DIR}
|
||||
${GTK2_ATK_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
if (GTK2_GTK_LIBRARY AND GTK2_GTK_INCLUDE_DIR)
|
||||
if (GTK2_GDK_LIBRARY AND GTK2_GDK_PIXBUF_LIBRARY AND GTK2_GDK_INCLUDE_DIR)
|
||||
if (GTK2_GMODULE_LIBRARY)
|
||||
if (GTK2_GTHREAD_LIBRARY)
|
||||
if (GTK2_GOBJECT_LIBRARY)
|
||||
if (GTK2_GLADE_LIBRARY AND GTK2_GLADE_INCLUDE_DIR)
|
||||
if (GTK2_PANGO_LIBRARY AND GTK2_PANGO_INCLUDE_DIR)
|
||||
if (GTK2_CAIRO_LIBRARY AND GTK2_CAIRO_INCLUDE_DIR)
|
||||
if (GTK2_ATK_LIBRARY AND GTK2_ATK_INCLUDE_DIR)
|
||||
|
||||
# set GTK2 libraries
|
||||
set (GTK2_LIBRARIES
|
||||
${GTK2_GTK_LIBRARY}
|
||||
${GTK2_GDK_LIBRARY}
|
||||
${GTK2_GDK_PIXBUF_LIBRARY}
|
||||
${GTK2_GMODULE_LIBRARY}
|
||||
${GTK2_GTHREAD_LIBRARY}
|
||||
${GTK2_GOBJECT_LIBRARY}
|
||||
${GTK2_GLADE_LIBRARY}
|
||||
${GTK2_PANGO_LIBRARY}
|
||||
${GTK2_CAIRO_LIBRARY}
|
||||
${GTK2_ATK_LIBRARY}
|
||||
)
|
||||
|
||||
# check for gtkgl support
|
||||
if (GTK2_GTKGL_LIBRARY AND GTK2_GTKGL_INCLUDE_DIR)
|
||||
set(GTK2_GTKGL_FOUND TRUE)
|
||||
|
||||
set(GTK2_INCLUDE_DIRS
|
||||
${GTK2_INCLUDE_DIR}
|
||||
${GTK2_GTKGL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
set(GTK2_LIBRARIES
|
||||
${GTK2_LIBRARIES}
|
||||
${GTK2_GTKGL_LIBRARY}
|
||||
)
|
||||
endif (GTK2_GTKGL_LIBRARY AND GTK2_GTKGL_INCLUDE_DIR)
|
||||
|
||||
else (GTK2_ATK_LIBRARY AND GTK2_ATK_INCLUDE_DIR)
|
||||
message(SEND_ERROR "Could not find ATK")
|
||||
endif (GTK2_ATK_LIBRARY AND GTK2_ATK_INCLUDE_DIR)
|
||||
else (GTK2_CAIRO_LIBRARY AND GTK2_CAIRO_INCLUDE_DIR)
|
||||
message(SEND_ERROR "Could not find CAIRO")
|
||||
endif (GTK2_CAIRO_LIBRARY AND GTK2_CAIRO_INCLUDE_DIR)
|
||||
else (GTK2_PANGO_LIBRARY AND GTK2_PANGO_INCLUDE_DIR)
|
||||
message(SEND_ERROR "Could not find PANGO")
|
||||
endif (GTK2_PANGO_LIBRARY AND GTK2_PANGO_INCLUDE_DIR)
|
||||
else (GTK2_GLADE_LIBRARY AND GTK2_GLADE_INCLUDE_DIR)
|
||||
message(SEND_ERROR "Could not find GLADE")
|
||||
endif (GTK2_GLADE_LIBRARY AND GTK2_GLADE_INCLUDE_DIR)
|
||||
else (GTK2_GOBJECT_LIBRARY)
|
||||
message(SEND_ERROR "Could not find GOBJECT")
|
||||
endif (GTK2_GOBJECT_LIBRARY)
|
||||
else (GTK2_GTHREAD_LIBRARY)
|
||||
message(SEND_ERROR "Could not find GTHREAD")
|
||||
endif (GTK2_GTHREAD_LIBRARY)
|
||||
else (GTK2_GMODULE_LIBRARY)
|
||||
message(SEND_ERROR "Could not find GMODULE")
|
||||
endif (GTK2_GMODULE_LIBRARY)
|
||||
else (GTK2_GDK_LIBRARY AND GTK2_GDK_PIXBUF_LIBRARY AND GTK2_GDK_INCLUDE_DIR)
|
||||
message(SEND_ERROR "Could not find GDK (GDK_PIXBUF)")
|
||||
endif (GTK2_GDK_LIBRARY AND GTK2_GDK_PIXBUF_LIBRARY AND GTK2_GDK_INCLUDE_DIR)
|
||||
else (GTK2_GTK_LIBRARY AND GTK2_GTK_INCLUDE_DIR)
|
||||
message(SEND_ERROR "Could not find GTK2-X11")
|
||||
endif (GTK2_GTK_LIBRARY AND GTK2_GTK_INCLUDE_DIR)
|
||||
|
||||
|
||||
if (GTK2_INCLUDE_DIRS AND GTK2_LIBRARIES)
|
||||
set(GTK2_FOUND TRUE)
|
||||
endif (GTK2_INCLUDE_DIRS AND GTK2_LIBRARIES)
|
||||
|
||||
if (GTK2_FOUND)
|
||||
if (NOT GTK2_FIND_QUIETLY)
|
||||
message(STATUS "Found GTK2: ${GTK2_LIBRARIES}")
|
||||
endif (NOT GTK2_FIND_QUIETLY)
|
||||
else (GTK2_FOUND)
|
||||
if (GTK2_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find GTK2")
|
||||
endif (GTK2_FIND_REQUIRED)
|
||||
endif (GTK2_FOUND)
|
||||
|
||||
# show the GTK2_INCLUDE_DIRS and GTK2_LIBRARIES variables only in the advanced view
|
||||
mark_as_advanced(GTK2_INCLUDE_DIRS GTK2_LIBRARIES)
|
||||
|
||||
endif (UNIX)
|
||||
endif (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
# - Locate Jpeg library
|
||||
# This module defines
|
||||
# JPEG_LIBRARY, the library to link against
|
||||
# JPEG_FOUND, if false, do not try to link to JPEG
|
||||
# JPEG_INCLUDE_DIR, where to find headers.
|
||||
|
||||
IF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
|
||||
# in cache already
|
||||
SET(JPEG_FIND_QUIETLY TRUE)
|
||||
ENDIF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
|
||||
|
||||
|
||||
FIND_PATH(JPEG_INCLUDE_DIR
|
||||
jpeglib.h
|
||||
PATHS
|
||||
$ENV{JPEG_DIR}/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
/opt/csw/include
|
||||
/opt/include
|
||||
PATH_SUFFIXES jpeg
|
||||
)
|
||||
|
||||
FIND_LIBRARY(JPEG_LIBRARY
|
||||
NAMES jpeg libjpeg
|
||||
PATHS
|
||||
$ENV{JPEG_DIR}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/local/X11R6/lib
|
||||
/usr/X11R6/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
IF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
|
||||
SET(JPEG_FOUND "YES")
|
||||
IF(NOT JPEG_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Jpeg: ${JPEG_LIBRARY}")
|
||||
ENDIF(NOT JPEG_FIND_QUIETLY)
|
||||
ELSE(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
|
||||
IF(NOT JPEG_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Warning: Unable to find Jpeg!")
|
||||
ENDIF(NOT JPEG_FIND_QUIETLY)
|
||||
ENDIF(JPEG_LIBRARY AND JPEG_INCLUDE_DIR)
|
|
@ -1,51 +0,0 @@
|
|||
# - Find MySQL
|
||||
# Find the MySQL includes and client library
|
||||
# This module defines
|
||||
# MYSQL_INCLUDE_DIR, where to find mysql.h
|
||||
# MYSQL_LIBRARIES, the libraries needed to use MySQL.
|
||||
# MYSQL_FOUND, If false, do not try to use MySQL.
|
||||
#
|
||||
# Copyright (c) 2006, Jaroslaw Staniek, <js@iidea.pl>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
IF(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
|
||||
SET(MYSQL_FOUND TRUE)
|
||||
|
||||
ELSE(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
|
||||
|
||||
FIND_PATH(MYSQL_INCLUDE_DIR mysql.h
|
||||
/usr/include/mysql
|
||||
/usr/local/include/mysql
|
||||
/opt/local/include/mysql5/mysql
|
||||
$ENV{ProgramFiles}/MySQL/*/include
|
||||
$ENV{SystemDrive}/MySQL/*/include)
|
||||
|
||||
IF(WIN32 AND MSVC)
|
||||
FIND_LIBRARY(MYSQL_LIBRARIES NAMES libmysql mysqlclient
|
||||
PATHS
|
||||
$ENV{ProgramFiles}/MySQL/*/lib/opt
|
||||
$ENV{SystemDrive}/MySQL/*/lib/opt)
|
||||
ELSE(WIN32 AND MSVC)
|
||||
FIND_LIBRARY(MYSQL_LIBRARIES NAMES mysqlclient
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/lib/mysql
|
||||
/usr/local/lib/mysql
|
||||
/opt/local/lib/mysql5/mysql
|
||||
)
|
||||
ENDIF(WIN32 AND MSVC)
|
||||
|
||||
IF(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
|
||||
SET(MYSQL_FOUND TRUE)
|
||||
MESSAGE(STATUS "Found MySQL: ${MYSQL_INCLUDE_DIR}, ${MYSQL_LIBRARIES}")
|
||||
ELSE(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
|
||||
SET(MYSQL_FOUND FALSE)
|
||||
MESSAGE(STATUS "MySQL not found.")
|
||||
ENDIF(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
|
||||
|
||||
MARK_AS_ADVANCED(MYSQL_INCLUDE_DIR MYSQL_LIBRARIES)
|
||||
|
||||
ENDIF(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
|
|
@ -1,48 +0,0 @@
|
|||
# - Locate NeL 3D library
|
||||
# This module defines
|
||||
# NEL3D_LIBRARY, the library to link against
|
||||
# NEL3D_FOUND, if false, do not try to link to NEL3D
|
||||
# NEL3D_INCLUDE_DIRS, where to find headers.
|
||||
|
||||
IF(NEL3D_LIBRARY AND NEL3D_INCLUDE_DIRS)
|
||||
# in cache already
|
||||
SET(NEL3D_FIND_QUIETLY TRUE)
|
||||
ENDIF(NEL3D_LIBRARY AND NEL3D_INCLUDE_DIRS)
|
||||
|
||||
FIND_PATH(NEL3D_INCLUDE_DIRS
|
||||
nel/3d/u_driver.h
|
||||
PATHS
|
||||
$ENV{NEL3D_DIR}/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
/opt/csw/include
|
||||
/opt/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(NEL3D_LIBRARY
|
||||
NAMES nel3d
|
||||
PATHS
|
||||
$ENV{NEL3D_DIR}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/local/X11R6/lib
|
||||
/usr/X11R6/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
IF(NEL3D_LIBRARY AND NEL3D_INCLUDE_DIRS)
|
||||
SET(NEL3D_FOUND "YES")
|
||||
IF(NOT NEL3D_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found NeL 3D: ${NEL3D_LIBRARY}")
|
||||
ENDIF(NOT NEL3D_FIND_QUIETLY)
|
||||
ELSE(NEL3D_LIBRARY AND NEL3D_INCLUDE_DIRS)
|
||||
IF(NOT NEL3D_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Warning: Unable to find NeL 3D!")
|
||||
ENDIF(NOT NEL3D_FIND_QUIETLY)
|
||||
ENDIF(NEL3D_LIBRARY AND NEL3D_INCLUDE_DIRS)
|
|
@ -1,52 +0,0 @@
|
|||
# - Locate NeL MISC library
|
||||
# This module defines
|
||||
# NELMISC_LIBRARY, the library to link against
|
||||
# NELMISC_FOUND, if false, do not try to link to NELMISC
|
||||
# NELMISC_INCLUDE_DIRS, where to find headers.
|
||||
|
||||
IF(NELMISC_LIBRARY AND NELMISC_INCLUDE_DIRS)
|
||||
# in cache already
|
||||
SET(NELMISC_FIND_QUIETLY TRUE)
|
||||
ENDIF(NELMISC_LIBRARY AND NELMISC_INCLUDE_DIRS)
|
||||
|
||||
FIND_PATH(NELMISC_INCLUDE_DIRS
|
||||
nel/misc/types_nl.h
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\NeL\\NeL;]/include
|
||||
$ENV{ProgramFiles}/NeL/include
|
||||
$ENV{NELMISC_DIR}/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
/opt/csw/include
|
||||
/opt/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(NELMISC_LIBRARY
|
||||
NAMES nelmisc nelmisc_r nelmisc_d
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\NeL\\NeL;]/lib
|
||||
$ENV{ProgramFiles}/NeL/lib
|
||||
$ENV{NELMISC_DIR}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/local/X11R6/lib
|
||||
/usr/X11R6/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
IF(NELMISC_LIBRARY AND NELMISC_INCLUDE_DIRS)
|
||||
SET(NELMISC_FOUND "YES")
|
||||
IF(NOT NELMISC_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found NeL MISC: ${NELMISC_LIBRARY}")
|
||||
ENDIF(NOT NELMISC_FIND_QUIETLY)
|
||||
ELSE(NELMISC_LIBRARY AND NELMISC_INCLUDE_DIRS)
|
||||
IF(NOT NELMISC_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Warning: Unable to find NeL MISC!")
|
||||
ENDIF(NOT NELMISC_FIND_QUIETLY)
|
||||
ENDIF(NELMISC_LIBRARY AND NELMISC_INCLUDE_DIRS)
|
|
@ -1,52 +0,0 @@
|
|||
# - Locate NeL NET library
|
||||
# This module defines
|
||||
# NELNET_LIBRARY, the library to link against
|
||||
# NELNET_FOUND, if false, do not try to link to NELNET
|
||||
# NELNET_INCLUDE_DIRS, where to find headers.
|
||||
|
||||
IF(NELNET_LIBRARY AND NELNET_INCLUDE_DIRS)
|
||||
# in cache already
|
||||
SET(NELNET_FIND_QUIETLY TRUE)
|
||||
ENDIF(NELNET_LIBRARY AND NELNET_INCLUDE_DIRS)
|
||||
|
||||
FIND_PATH(NELNET_INCLUDE_DIRS
|
||||
nel/net/service.h
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\NeL\\NeL;]/include
|
||||
$ENV{ProgramFiles}/NeL/include
|
||||
$ENV{NELNET_DIR}/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
/opt/csw/include
|
||||
/opt/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(NELNET_LIBRARY
|
||||
NAMES nelnet nelnet_r nelnet_d
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\NeL\\NeL;]/lib
|
||||
$ENV{ProgramFiles}/NeL/lib
|
||||
$ENV{NELNET_DIR}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/local/X11R6/lib
|
||||
/usr/X11R6/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
IF(NELNET_LIBRARY AND NELNET_INCLUDE_DIRS)
|
||||
SET(NELNET_FOUND "YES")
|
||||
IF(NOT NELNET_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found NeL NET: ${NELNET_LIBRARY}")
|
||||
ENDIF(NOT NELNET_FIND_QUIETLY)
|
||||
ELSE(NELNET_LIBRARY AND NELNET_INCLUDE_DIRS)
|
||||
IF(NOT NELNET_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Warning: Unable to find NeL NET!")
|
||||
ENDIF(NOT NELNET_FIND_QUIETLY)
|
||||
ENDIF(NELNET_LIBRARY AND NELNET_INCLUDE_DIRS)
|
|
@ -1,202 +0,0 @@
|
|||
###
|
||||
# Build Library Name
|
||||
#
|
||||
# Arguments: name - undecorated library name
|
||||
# Sets: LIBNAME - decorated library name
|
||||
###
|
||||
MACRO(DECORATE_NEL_LIB name)
|
||||
|
||||
IF(WIN32)
|
||||
IF(NL_BUILD_MODE MATCHES "NL_RELEASE_DEBUG")
|
||||
SET(LIBNAME "${name}")
|
||||
ELSE(NL_BUILD_MODE MATCHES "NL_RELEASE_DEBUG")
|
||||
IF(NL_BUILD_MODE MATCHES "NL_DEBUG")
|
||||
SET(LIBNAME "${name}")
|
||||
ELSE(NL_BUILD_MODE MATCHES "NL_DEBUG")
|
||||
SET(LIBNAME "${name}")
|
||||
ENDIF(NL_BUILD_MODE MATCHES "NL_DEBUG")
|
||||
ENDIF(NL_BUILD_MODE MATCHES "NL_RELEASE_DEBUG")
|
||||
ELSE(WIN32)
|
||||
SET(LIBNAME "${name}")
|
||||
ENDIF(WIN32)
|
||||
|
||||
ENDMACRO(DECORATE_NEL_LIB)
|
||||
|
||||
###
|
||||
# Checks build vs. source location. Prevents In-Source builds.
|
||||
###
|
||||
MACRO(CHECK_OUT_OF_SOURCE)
|
||||
IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
MESSAGE(FATAL_ERROR "
|
||||
|
||||
CMake generation for this project is not allowed within the source directory!
|
||||
Remove the CMakeCache.txt file and try again from another folder, e.g.:
|
||||
|
||||
rm CMakeCache.txt
|
||||
mkdir cmake
|
||||
cd cmake
|
||||
cmake -G \"Unix Makefiles\" ..
|
||||
")
|
||||
ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
|
||||
ENDMACRO(CHECK_OUT_OF_SOURCE)
|
||||
|
||||
MACRO(NL_SETUP_DEFAULT_OPTIONS)
|
||||
###
|
||||
# Features
|
||||
###
|
||||
OPTION(WITH_LOGGING "With Logging" ON )
|
||||
OPTION(WITH_COVERAGE "With Code Coverage Support" OFF)
|
||||
|
||||
###
|
||||
# Core libraries
|
||||
###
|
||||
|
||||
###
|
||||
# Drivers Support
|
||||
###
|
||||
|
||||
###
|
||||
# Optional support
|
||||
###
|
||||
OPTION(WITH_GTK "With GTK Support" OFF)
|
||||
OPTION(WITH_QT "With QT Support" OFF)
|
||||
|
||||
ENDMACRO(NL_SETUP_DEFAULT_OPTIONS)
|
||||
|
||||
MACRO(NL_SETUP_BUILD)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Setup the buildmode variables.
|
||||
#
|
||||
# None = NL_RELEASE_DEBUG
|
||||
# Debug = NL_DEBUG
|
||||
# Release = NL_RELEASE
|
||||
# RelWithDebInfo = NL_RELEASE_DEBUG
|
||||
# MinSizeRel = NL_RELEASE_DEBUG
|
||||
|
||||
# None = NL_RELEASE
|
||||
# Debug = NL_DEBUG
|
||||
# Release = NL_RELEASE, NL_NO_DEBUG
|
||||
# RelWithDebInfo = NL_RELEASE
|
||||
# MinSizeRel = NL_RELEASE, NL_NO_DEBUG
|
||||
|
||||
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
SET(NL_BUILD_MODE "NL_DEBUG")
|
||||
ELSE(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
IF(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
SET(NL_BUILD_MODE "NL_RELEASE")
|
||||
ELSE(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
SET(NL_BUILD_MODE "NL_RELEASE")
|
||||
# enforce release mode if it's neither Debug nor Release
|
||||
SET(CMAKE_BUILD_TYPE "Release")
|
||||
ENDIF(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
ENDIF(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
|
||||
IF(WIN32)
|
||||
SET(NL_DEBUG_CFLAGS "/ZI /Gy /GS-")
|
||||
SET(NL_RELEASE_CFLAGS "/Ox /Ob2 /Oi /Ot /Oy /GT /GF")
|
||||
SET(NL_RELEASEDEBUG_CFLAGS "/DNL_RELEASE_DEBUG /Ob2 /GF")
|
||||
ELSE(WIN32)
|
||||
SET(PLATFORM_CFLAGS "-ftemplate-depth-24 -D_REENTRANT -Wall -ansi -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-long-long -Wno-unused")
|
||||
IF(WITH_COVERAGE)
|
||||
SET(PLATFORM_CFLAGS "-fprofile-arcs -ftest-coverage ${PLATFORM_CFLAGS}")
|
||||
ENDIF(WITH_COVERAGE)
|
||||
SET(PLATFORM_LINKFLAGS "${CMAKE_THREAD_LIBS_INIT} -lc -lm -lstdc++")
|
||||
IF(NOT APPLE)
|
||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -lrt")
|
||||
ENDIF(NOT APPLE)
|
||||
SET(NL_DEBUG_CFLAGS "-DNL_DEBUG -g")
|
||||
SET(NL_RELEASE_CFLAGS "-DNL_RELEASE -O6")
|
||||
SET(NL_RELEASEDEBUG_CFLAGS "-DNL_RELEASE_DEBUG -g -finline-functions -O3 ")
|
||||
SET(NL_NONE_CFLAGS "-DNL_RELEASE -g -finline-functions -O2 ")
|
||||
ENDIF(WIN32)
|
||||
|
||||
# Determine host CPU
|
||||
IF(UNIX AND NOT WIN32)
|
||||
FIND_PROGRAM(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
|
||||
IF(CMAKE_UNAME)
|
||||
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR)
|
||||
SET(CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR} CACHE INTERNAL "processor type (i386 and x86_64)")
|
||||
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
ADD_DEFINITIONS(-DHAVE_X86_64)
|
||||
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "ia64")
|
||||
ADD_DEFINITIONS(-DHAVE_IA64)
|
||||
ELSE(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
ADD_DEFINITIONS(-DHAVE_X86)
|
||||
ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
ELSE(CMAKE_UNAME) # Assume that if uname is not found that we're x86.
|
||||
ADD_DEFINITIONS(-DHAVE_X86)
|
||||
ENDIF(CMAKE_UNAME)
|
||||
ENDIF(UNIX AND NOT WIN32)
|
||||
|
||||
ENDMACRO(NL_SETUP_BUILD)
|
||||
|
||||
MACRO(NL_SETUP_BUILD_FLAGS)
|
||||
## None
|
||||
#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${NL_NONE_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NL_NONE_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
|
||||
## Debug
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${NL_DEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${NL_DEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
|
||||
## Release
|
||||
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${NL_RELEASE_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${NL_RELEASE_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
|
||||
## RelWithDebInfo
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
|
||||
## MinSizeRel
|
||||
SET(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
ENDMACRO(NL_SETUP_BUILD_FLAGS)
|
||||
|
||||
MACRO(NL_SETUP_PREFIX_PATHS)
|
||||
## Allow override of install_prefix/etc path.
|
||||
IF(NOT NL_ETC_PREFIX)
|
||||
IF(WIN32)
|
||||
SET(NL_ETC_PREFIX "../etc/nel" CACHE PATH "Installation path for configurations")
|
||||
ELSE(WIN32)
|
||||
SET(NL_ETC_PREFIX "${CMAKE_INSTALL_PREFIX}/etc/nel" CACHE PATH "Installation path for configurations")
|
||||
ENDIF(WIN32)
|
||||
ENDIF(NOT NL_ETC_PREFIX)
|
||||
|
||||
## Allow override of install_prefix/share path.
|
||||
IF(NOT NL_SHARE_PREFIX)
|
||||
IF(WIN32)
|
||||
SET(NL_SHARE_PREFIX "../share/nel" CACHE PATH "Installation path for data.")
|
||||
ELSE(WIN32)
|
||||
SET(NL_SHARE_PREFIX "${CMAKE_INSTALL_PREFIX}/share/nel" CACHE PATH "Installation path for data.")
|
||||
ENDIF(WIN32)
|
||||
ENDIF(NOT NL_SHARE_PREFIX)
|
||||
|
||||
## Allow override of install_prefix/sbin path.
|
||||
IF(NOT NL_SBIN_PREFIX)
|
||||
IF(WIN32)
|
||||
SET(NL_SBIN_PREFIX "../sbin" CACHE PATH "Installation path for admin tools and services.")
|
||||
ELSE(WIN32)
|
||||
SET(NL_SBIN_PREFIX "${CMAKE_INSTALL_PREFIX}/sbin" CACHE PATH "Installation path for admin tools and services.")
|
||||
ENDIF(WIN32)
|
||||
ENDIF(NOT NL_SBIN_PREFIX)
|
||||
|
||||
## Allow override of install_prefix/bin path.
|
||||
IF(NOT NL_BIN_PREFIX)
|
||||
IF(WIN32)
|
||||
SET(NL_BIN_PREFIX "../bin" CACHE PATH "Installation path for tools and applications.")
|
||||
ELSE(WIN32)
|
||||
SET(NL_BIN_PREFIX "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation path for tools and applications.")
|
||||
ENDIF(WIN32)
|
||||
ENDIF(NOT NL_BIN_PREFIX)
|
||||
|
||||
## Allow override of install_prefix/var/log path.
|
||||
IF(NOT NL_LOG_PREFIX)
|
||||
IF(WIN32)
|
||||
SET(NL_LOG_PREFIX "../var/log" CACHE PATH "Installation path for tools and applications.")
|
||||
ELSE(WIN32)
|
||||
SET(NL_LOG_PREFIX "${CMAKE_INSTALL_PREFIX}/var/log" CACHE PATH "Installation path for tools and applications.")
|
||||
ENDIF(WIN32)
|
||||
ENDIF(NOT NL_LOG_PREFIX)
|
||||
ENDMACRO(NL_SETUP_PREFIX_PATHS)
|
|
@ -1,162 +0,0 @@
|
|||
# - Locate NeL 3D library
|
||||
# This module defines
|
||||
# NEL3D_LIBRARY, the library to link against
|
||||
# NEL_FOUND, if false, do not try to link to NEL3D
|
||||
# NEL_INCLUDE_DIR, where to find headers.
|
||||
|
||||
IF(NELMISC_LIBRARY AND NEL_INCLUDE_DIR)
|
||||
# in cache already
|
||||
SET(NEL_FIND_QUIETLY TRUE)
|
||||
ENDIF(NELMISC_LIBRARY AND NEL_INCLUDE_DIR)
|
||||
|
||||
# Assume we find NeL and correct it along the way.
|
||||
SET(NEL_FOUND "YES")
|
||||
|
||||
# determine the components to retrieve.
|
||||
IF(NOT NeL_FIND_COMPONENTS)
|
||||
# We must always have nelmisc.
|
||||
SET(NeL_FIND_COMPONENTS nelmisc)
|
||||
ELSE(NOT NeL_FIND_COMPONENTS)
|
||||
# Make sure we have nelmisc in the list.
|
||||
LIST(FIND NeL_FIND_COMPONENTS nelmisc TMP_FIND_NELMISC)
|
||||
IF(TMP_FIND_NELMISC EQUAL -1)
|
||||
LIST(APPEND NeL_FIND_COMPONENTS nelmisc)
|
||||
ENDIF(TMP_FIND_NELMISC EQUAL -1)
|
||||
ENDIF(NOT NeL_FIND_COMPONENTS)
|
||||
|
||||
# Find the path to the NeL includes.
|
||||
FIND_PATH(NEL_INCLUDE_DIR nel/misc/types_nl.h
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\NeL\\NeL;]/include
|
||||
$ENV{ProgramFiles}/NeL/include
|
||||
$ENV{NEL_DIR}/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
/opt/csw/include
|
||||
/opt/include)
|
||||
|
||||
# Make sure we found the include files.
|
||||
IF(NOT NEL_INCLUDE_DIR)
|
||||
SET(NEL_FOUND "NO")
|
||||
ENDIF(NOT NEL_INCLUDE_DIR)
|
||||
|
||||
# A utility macro to wrap NeL finds...
|
||||
MACRO(FIND_NEL_LIBRARY MYLIBRARY)
|
||||
FIND_LIBRARY(${MYLIBRARY}
|
||||
NAMES ${ARGN}
|
||||
PATHS
|
||||
[HKEY_LOCAL_MACHINE\\SOFTWARE\\NeL\\NeL;]/lib
|
||||
$ENV{ProgramFiles}/NeL/lib
|
||||
$ENV{NEL_DIR}/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/local/X11R6/lib
|
||||
/usr/X11R6/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
/opt/csw/lib
|
||||
/opt/lib
|
||||
/usr/freeware/lib64)
|
||||
ENDMACRO(FIND_NEL_LIBRARY MYLIBRARY)
|
||||
|
||||
|
||||
# Find the library for each required library.
|
||||
FOREACH(NL_F_COMPONENT ${NeL_FIND_COMPONENTS})
|
||||
# Check for NeL Misc
|
||||
IF(NL_F_COMPONENT STREQUAL "nelmisc")
|
||||
FIND_NEL_LIBRARY(NELMISC_LIBRARY nelmisc nelmisc_r)
|
||||
IF(WIN32)
|
||||
FIND_NEL_LIBRARY(NELMISC_LIBRARY_DEBUG nelmisc_d)
|
||||
ENDIF(WIN32)
|
||||
IF(NOT NELMISC_LIBRARY)
|
||||
SET(NEL_FOUND "NO")
|
||||
ENDIF(NOT NELMISC_LIBRARY)
|
||||
|
||||
# Check for NeL 3D
|
||||
ELSEIF(NL_F_COMPONENT STREQUAL "nel3d")
|
||||
FIND_NEL_LIBRARY(NEL3D_LIBRARY nel3d nel3d_r)
|
||||
IF(WIN32)
|
||||
FIND_NEL_LIBRARY(NEL3D_LIBRARY_DEBUG nel3d_d)
|
||||
ENDIF(WIN32)
|
||||
IF(NOT NEL3D_LIBRARY)
|
||||
SET(NEL_FOUND "NO")
|
||||
ENDIF(NOT NEL3D_LIBRARY)
|
||||
|
||||
# Check for NeL Georges
|
||||
ELSEIF(NL_F_COMPONENT STREQUAL "nelgeorges")
|
||||
FIND_NEL_LIBRARY(NELGEORGES_LIBRARY nelgeorges nelgeorges_r)
|
||||
IF(WIN32)
|
||||
FIND_NEL_LIBRARY(NELGEORGES_LIBRARY_DEBUG nelgeorges_d)
|
||||
ENDIF(WIN32)
|
||||
IF(NOT NELGEORGES_LIBRARY)
|
||||
SET(NEL_FOUND "NO")
|
||||
ENDIF(NOT NELGEORGES_LIBRARY)
|
||||
|
||||
# Check for NeL Net
|
||||
ELSEIF(NL_F_COMPONENT STREQUAL "nelnet")
|
||||
FIND_NEL_LIBRARY(NELNET_LIBRARY nelnet nelnet_r)
|
||||
IF(WIN32)
|
||||
FIND_NEL_LIBRARY(NELNET_LIBRARY_DEBUG nelnet_d)
|
||||
ENDIF(WIN32)
|
||||
IF(NOT NELNET_LIBRARY)
|
||||
SET(NEL_FOUND "NO")
|
||||
ENDIF(NOT NELNET_LIBRARY)
|
||||
|
||||
# Check for NeL PACS
|
||||
ELSEIF(NL_F_COMPONENT STREQUAL "nelpacs")
|
||||
FIND_NEL_LIBRARY(NELPACS_LIBRARY nelpacs nelpacs_r)
|
||||
IF(WIN32)
|
||||
FIND_NEL_LIBRARY(NELPACS_LIBRARY_DEBUG nelpacs_d)
|
||||
ENDIF(WIN32)
|
||||
IF(NOT NELPACS_LIBRARY)
|
||||
SET(NEL_FOUND "NO")
|
||||
ENDIF(NOT NELPACS_LIBRARY)
|
||||
|
||||
# Check for NeL Ligoscape
|
||||
ELSEIF(NL_F_COMPONENT STREQUAL "nelligo")
|
||||
FIND_NEL_LIBRARY(NELLIGO_LIBRARY nelligo nelligo_r)
|
||||
IF(WIN32)
|
||||
FIND_NEL_LIBRARY(NELLIGO_LIBRARY_DEBUG nelligo_d)
|
||||
ENDIF(WIN32)
|
||||
IF(NOT NELLIGO_LIBRARY)
|
||||
SET(NEL_FOUND "NO")
|
||||
ENDIF(NOT NELLIGO_LIBRARY)
|
||||
|
||||
# Check for NeL Sound Lowlevel
|
||||
ELSEIF(NL_F_COMPONENT STREQUAL "nelsnd_lowlevel")
|
||||
FIND_NEL_LIBRARY(NELSNDDRV_LIBRARY nelsnd_lowlevel nelsnd_lowlevel_r)
|
||||
IF(WIN32)
|
||||
FIND_NEL_LIBRARY(NELSNDDRV_LIBRARY_DEBUG nelsnd_lowlevel_d)
|
||||
ENDIF(WIN32)
|
||||
IF(NOT NELSNDDRV_LIBRARY)
|
||||
SET(NEL_FOUND "NO")
|
||||
ENDIF(NOT NELSNDDRV_LIBRARY)
|
||||
|
||||
# Check for NeL Sound
|
||||
ELSEIF(NL_F_COMPONENT STREQUAL "nelsound")
|
||||
FIND_NEL_LIBRARY(NELSOUND_LIBRARY nelsound nelsound_r)
|
||||
IF(WIN32)
|
||||
FIND_NEL_LIBRARY(NELSOUND_LIBRARY_DEBUG nelsound_d)
|
||||
ENDIF(WIN32)
|
||||
IF(NOT NELSOUND_LIBRARY)
|
||||
SET(NEL_FOUND "NO")
|
||||
ENDIF(NOT NELSOUND_LIBRARY)
|
||||
|
||||
# Output an error message if an unknown component is requested.
|
||||
ELSE(NL_F_COMPONENT STREQUAL "nelmisc")
|
||||
MESSAGE(ERROR " Unknown component ${NL_F_COMPONENT}!!")
|
||||
SET(NEL_FOUND "NO")
|
||||
ENDIF(NL_F_COMPONENT STREQUAL "nelmisc")
|
||||
ENDFOREACH(NL_F_COMPONENT ${NeL_FIND_COMPONENTS})
|
||||
|
||||
IF(NEL_FOUND STREQUAL "YES")
|
||||
IF(NOT NEL_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found NeL: ${NELMISC_LIBRARY}")
|
||||
ENDIF(NOT NEL_FIND_QUIETLY)
|
||||
ELSE(NEL_FOUND STREQUAL "YES")
|
||||
IF(NOT NEL_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Warning: Unable to find NeL!")
|
||||
ENDIF(NOT NEL_FIND_QUIETLY)
|
||||
ENDIF(NEL_FOUND STREQUAL "YES")
|
|
@ -1,212 +0,0 @@
|
|||
# - Try to find precompiled headers support for GCC 3.4 and 4.x (and MSVC)
|
||||
# Once done this will define:
|
||||
#
|
||||
# Variable:
|
||||
# PCHSupport_FOUND
|
||||
#
|
||||
# ADD_PRECOMPILED_HEADER _targetName _inputh _inputcpp
|
||||
# ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use
|
||||
# ADD_NATIVE_PRECOMPILED_HEADER _targetName _inputh _inputcpp
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
EXEC_PROGRAM(
|
||||
${CMAKE_CXX_COMPILER}
|
||||
ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
|
||||
OUTPUT_VARIABLE gcc_compiler_version)
|
||||
|
||||
IF(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
|
||||
SET(PCHSupport_FOUND TRUE)
|
||||
ELSE(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
|
||||
IF(gcc_compiler_version MATCHES "3\\.4\\.[0-9]")
|
||||
SET(PCHSupport_FOUND TRUE)
|
||||
ENDIF(gcc_compiler_version MATCHES "3\\.4\\.[0-9]")
|
||||
ENDIF(gcc_compiler_version MATCHES "4\\.[0-9]\\.[0-9]")
|
||||
|
||||
SET(_PCH_include_prefix "-I")
|
||||
|
||||
ELSE(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
IF(WIN32)
|
||||
SET(PCHSupport_FOUND TRUE) # for experimental msvc support
|
||||
SET(_PCH_include_prefix "/I")
|
||||
ELSE(WIN32)
|
||||
SET(PCHSupport_FOUND FALSE)
|
||||
ENDIF(WIN32)
|
||||
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
|
||||
|
||||
STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name)
|
||||
SET(${_out_compile_flags} ${${_flags_var_name}} )
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
|
||||
IF(${_targetType} STREQUAL SHARED_LIBRARY AND NOT WIN32)
|
||||
LIST(APPEND ${_out_compile_flags} "-fPIC")
|
||||
ENDIF(${_targetType} STREQUAL SHARED_LIBRARY AND NOT WIN32)
|
||||
|
||||
ELSE(CMAKE_COMPILER_IS_GNUCXX)
|
||||
## TODO ... ? or does it work out of the box
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES )
|
||||
FOREACH(item ${DIRINC})
|
||||
LIST(APPEND ${_out_compile_flags} "${_PCH_include_prefix}${item}")
|
||||
ENDFOREACH(item)
|
||||
|
||||
GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
|
||||
GET_DIRECTORY_PROPERTY(_global_definitions DIRECTORY ${CMAKE_SOURCE_DIR} DEFINITIONS)
|
||||
LIST(APPEND ${_out_compile_flags} ${_directory_flags})
|
||||
LIST(APPEND ${_out_compile_flags} ${_global_definitions})
|
||||
LIST(APPEND ${_out_compile_flags} ${CMAKE_CXX_FLAGS})
|
||||
|
||||
SEPARATE_ARGUMENTS(${_out_compile_flags})
|
||||
|
||||
ENDMACRO(_PCH_GET_COMPILE_FLAGS)
|
||||
|
||||
MACRO(_PCH_GET_COMPILE_COMMAND out_command _input _output)
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
IF(CMAKE_CXX_COMPILER_ARG1)
|
||||
# remove leading space in compiler argument
|
||||
STRING(REGEX REPLACE "^ +" "" pchsupport_compiler_cxx_arg1 ${CMAKE_CXX_COMPILER_ARG1})
|
||||
|
||||
SET(${out_command}
|
||||
${CMAKE_CXX_COMPILER} ${pchsupport_compiler_cxx_arg1} ${_compile_FLAGS} -x c++-header -o ${_output} -c ${_input}
|
||||
)
|
||||
ELSE(CMAKE_CXX_COMPILER_ARG1)
|
||||
SET(${out_command}
|
||||
${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -o ${_output} -c ${_input}
|
||||
)
|
||||
ENDIF(CMAKE_CXX_COMPILER_ARG1)
|
||||
ELSE(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
# nothing to do because std*.cpp are already added to target
|
||||
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
ENDMACRO(_PCH_GET_COMPILE_COMMAND )
|
||||
|
||||
|
||||
|
||||
MACRO(_PCH_GET_TARGET_COMPILE_FLAGS _cflags _header_name _pch_path)
|
||||
|
||||
FILE(TO_NATIVE_PATH ${_pch_path} _native_pch_path)
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
# for use with distcc and gcc >4.0.1 if preprocessed files are accessible
|
||||
# on all remote machines set
|
||||
# PCH_ADDITIONAL_COMPILER_FLAGS to -fpch-preprocess
|
||||
SET(${_cflags} "${PCH_ADDITIONAL_COMPILER_FLAGS}-include ${CMAKE_CURRENT_BINARY_DIR}/${_header_name} -Winvalid-pch")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
ENDMACRO(_PCH_GET_TARGET_COMPILE_FLAGS )
|
||||
|
||||
MACRO(GET_PRECOMPILED_HEADER_OUTPUT _targetName _input _output)
|
||||
GET_FILENAME_COMPONENT(_name ${_input} NAME)
|
||||
SET(_output "${CMAKE_CURRENT_BINARY_DIR}/${_name}.gch")
|
||||
ENDMACRO(GET_PRECOMPILED_HEADER_OUTPUT _targetName _input)
|
||||
|
||||
|
||||
MACRO(ADD_PRECOMPILED_HEADER_TO_TARGET _targetName _input _pch_output_to_use )
|
||||
|
||||
# to do: test whether compiler flags match between target _targetName
|
||||
# and _pch_output_to_use
|
||||
GET_FILENAME_COMPONENT(_name ${_input} NAME)
|
||||
|
||||
_PCH_GET_TARGET_COMPILE_FLAGS(_target_cflags ${_name} ${_pch_output_to_use})
|
||||
|
||||
SET_TARGET_PROPERTIES(${_targetName}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS ${_target_cflags}
|
||||
)
|
||||
|
||||
ADD_CUSTOM_TARGET(pch_Generate_${_targetName}
|
||||
DEPENDS ${_pch_output_to_use}
|
||||
)
|
||||
|
||||
ADD_DEPENDENCIES(${_targetName} pch_Generate_${_targetName} )
|
||||
|
||||
ENDMACRO(ADD_PRECOMPILED_HEADER_TO_TARGET)
|
||||
|
||||
MACRO(ADD_PRECOMPILED_HEADER _targetName _inputh _inputcpp)
|
||||
|
||||
SET(_PCH_current_target ${_targetName})
|
||||
|
||||
IF(NOT CMAKE_BUILD_TYPE)
|
||||
MESSAGE(FATAL_ERROR
|
||||
"This is the ADD_PRECOMPILED_HEADER macro. "
|
||||
"You must set CMAKE_BUILD_TYPE!"
|
||||
)
|
||||
ENDIF(NOT CMAKE_BUILD_TYPE)
|
||||
|
||||
GET_PRECOMPILED_HEADER_OUTPUT( ${_targetName} ${_inputh} _output)
|
||||
|
||||
GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
|
||||
|
||||
# always build static library because it doesn't need linking
|
||||
ADD_LIBRARY(${_targetName}_pch_dephelp STATIC ${_inputcpp})
|
||||
|
||||
_PCH_GET_COMPILE_FLAGS(_compile_FLAGS)
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES(${_inputh} PROPERTIES GENERATED 1)
|
||||
|
||||
_PCH_GET_COMPILE_COMMAND(_command ${_inputh} ${_output})
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${_output}
|
||||
COMMAND ${_command}
|
||||
DEPENDS ${_inputh} ${_targetName}_pch_dephelp
|
||||
)
|
||||
|
||||
ADD_PRECOMPILED_HEADER_TO_TARGET(${_targetName} ${_inputh} ${_output})
|
||||
|
||||
ENDMACRO(ADD_PRECOMPILED_HEADER)
|
||||
|
||||
MACRO(ADD_NATIVE_PRECOMPILED_HEADER _targetName _inputh _inputcpp)
|
||||
|
||||
if(CMAKE_GENERATOR MATCHES Visual*)
|
||||
# Auto include the precompile (useful for moc processing, since the use of
|
||||
# precompiled is specified at the target level
|
||||
# and I don't want to specifiy /F- for each moc/res/ui generated files (using Qt)
|
||||
|
||||
GET_TARGET_PROPERTY(oldProps ${_targetName} COMPILE_FLAGS)
|
||||
if (${oldProps} MATCHES NOTFOUND)
|
||||
SET(oldProps "")
|
||||
endif(${oldProps} MATCHES NOTFOUND)
|
||||
|
||||
SET(newProperties "${oldProps} /Yu\"${_inputh}\" /FI\"${_inputh}\"")
|
||||
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES COMPILE_FLAGS "${newProperties}")
|
||||
|
||||
#also inlude ${oldProps} to have the same compile options
|
||||
SET_SOURCE_FILES_PROPERTIES(${_inputcpp} PROPERTIES COMPILE_FLAGS "${oldProps} /Yc\"${_inputh}\"")
|
||||
|
||||
else(CMAKE_GENERATOR MATCHES Visual*)
|
||||
|
||||
if (CMAKE_GENERATOR MATCHES Xcode)
|
||||
# For Xcode, cmake needs my patch to process
|
||||
# GCC_PREFIX_HEADER and GCC_PRECOMPILE_PREFIX_HEADER as target properties
|
||||
|
||||
GET_TARGET_PROPERTY(oldProps ${_targetName} COMPILE_FLAGS)
|
||||
if (${oldProps} MATCHES NOTFOUND)
|
||||
SET(oldProps "")
|
||||
endif(${oldProps} MATCHES NOTFOUND)
|
||||
|
||||
# When buiding out of the tree, precompiled may not be located
|
||||
# Use full path instead.
|
||||
GET_FILENAME_COMPONENT(fullPath ${_inputh} ABSOLUTE)
|
||||
|
||||
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "${fullPath}")
|
||||
SET_TARGET_PROPERTIES(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES")
|
||||
|
||||
else (CMAKE_GENERATOR MATCHES Xcode)
|
||||
|
||||
#Fallback to the "old" precompiled suppport
|
||||
ADD_PRECOMPILED_HEADER(${_targetName} ${_inputh} ${_inputcpp})
|
||||
endif(CMAKE_GENERATOR MATCHES Xcode)
|
||||
endif(CMAKE_GENERATOR MATCHES Visual*)
|
||||
|
||||
ENDMACRO(ADD_NATIVE_PRECOMPILED_HEADER)
|
|
@ -1,176 +0,0 @@
|
|||
###
|
||||
# Checks build vs. source location. Prevents In-Source builds.
|
||||
###
|
||||
MACRO(CHECK_OUT_OF_SOURCE)
|
||||
IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
MESSAGE(FATAL_ERROR "
|
||||
|
||||
CMake generation for this project is not allowed within the source directory!
|
||||
Remove the CMakeCache.txt file and try again from another folder, e.g.:
|
||||
|
||||
rm CMakeCache.txt
|
||||
mkdir cmake
|
||||
cd cmake
|
||||
cmake -G \"Unix Makefiles\" ..
|
||||
")
|
||||
ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
|
||||
ENDMACRO(CHECK_OUT_OF_SOURCE)
|
||||
|
||||
MACRO(NL_SETUP_DEFAULT_OPTIONS)
|
||||
###
|
||||
# Build options
|
||||
###
|
||||
|
||||
OPTION(WITH_CLIENT "Build Ryzom Core Client" ON )
|
||||
OPTION(WITH_TOOLS "Build Ryzom Core Tools" ON )
|
||||
OPTION(WITH_SERVER "Build Ryzom Core Services" ON )
|
||||
OPTION(WITH_LUA51 "Build Ryzom Core using Lua51" ON )
|
||||
OPTION(FINAL_VERSION "Build in Final Version mode" ON )
|
||||
|
||||
###
|
||||
# Features
|
||||
###
|
||||
OPTION(WITH_LOGGING "With Logging" ON )
|
||||
OPTION(WITH_COVERAGE "With Code Coverage Support" OFF)
|
||||
OPTION(WITH_PCH "With Precompiled Headers" ON )
|
||||
|
||||
###
|
||||
# Optional support
|
||||
###
|
||||
OPTION(WITH_SOUND "Build Sound Support" OFF)
|
||||
OPTION(BUILD_DASHBOARD "Build to the CDash dashboard" OFF)
|
||||
ENDMACRO(NL_SETUP_DEFAULT_OPTIONS)
|
||||
|
||||
|
||||
MACRO(NL_SETUP_BUILD)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Setup the buildmode variables.
|
||||
#
|
||||
# None = NL_RELEASE
|
||||
# Debug = NL_DEBUG
|
||||
# Release = NL_RELEASE, NL_NO_DEBUG
|
||||
# RelWithDebInfo = NL_RELEASE
|
||||
# MinSizeRel = NL_RELEASE, NL_NO_DEBUG
|
||||
|
||||
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
SET(NL_BUILD_MODE "NL_DEBUG")
|
||||
ELSE(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
IF(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
SET(NL_BUILD_MODE "NL_RELEASE")
|
||||
ELSE(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
SET(NL_BUILD_MODE "NL_RELEASE")
|
||||
# enforce release mode if it's neither Debug nor Release
|
||||
SET(CMAKE_BUILD_TYPE "Release")
|
||||
ENDIF(CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
ENDIF(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
|
||||
IF(WIN32)
|
||||
SET(NL_DEBUG_CFLAGS "/ZI /Gy /GS-")
|
||||
SET(NL_RELEASE_CFLAGS "/Ox /Ob2 /Oi /Ot /Oy /GT /GF")
|
||||
SET(NL_RELEASEDEBUG_CFLAGS "/DNL_RELEASE_DEBUG /Ob2 /GF")
|
||||
ELSE(WIN32)
|
||||
SET(PLATFORM_CFLAGS "-ftemplate-depth-48 -D_REENTRANT -Wall -ansi -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-long-long -Wno-unused -fno-strict-aliasing")
|
||||
IF(WITH_COVERAGE)
|
||||
SET(PLATFORM_CFLAGS "-fprofile-arcs -ftest-coverage ${PLATFORM_CFLAGS}")
|
||||
ENDIF(WITH_COVERAGE)
|
||||
SET(PLATFORM_LINKFLAGS "${CMAKE_THREAD_LIBS_INIT} -lc -lm -lstdc++")
|
||||
IF(NOT APPLE)
|
||||
SET(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -lrt")
|
||||
ENDIF(NOT APPLE)
|
||||
SET(NL_DEBUG_CFLAGS "-DNL_DEBUG -g")
|
||||
SET(NL_RELEASE_CFLAGS "-DNL_RELEASE -O6 -g")
|
||||
SET(NL_RELEASEDEBUG_CFLAGS "-DNL_RELEASE_DEBUG -g -finline-functions -O3 ")
|
||||
SET(NL_NONE_CFLAGS "-DNL_RELEASE -g -finline-functions -O2 ")
|
||||
ENDIF(WIN32)
|
||||
|
||||
# Determine host CPU
|
||||
IF(UNIX AND NOT WIN32)
|
||||
FIND_PROGRAM(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
|
||||
IF(CMAKE_UNAME)
|
||||
EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR)
|
||||
SET(CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR} CACHE INTERNAL "processor type (i386 and x86_64)")
|
||||
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
ADD_DEFINITIONS(-DHAVE_X86_64)
|
||||
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "ia64")
|
||||
ADD_DEFINITIONS(-DHAVE_IA64)
|
||||
ELSE(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
ADD_DEFINITIONS(-DHAVE_X86)
|
||||
ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||
ELSE(CMAKE_UNAME) # Assume that if uname is not found that we're x86.
|
||||
ADD_DEFINITIONS(-DHAVE_X86)
|
||||
ENDIF(CMAKE_UNAME)
|
||||
ENDIF(UNIX AND NOT WIN32)
|
||||
|
||||
ENDMACRO(NL_SETUP_BUILD)
|
||||
|
||||
MACRO(NL_SETUP_BUILD_FLAGS)
|
||||
## None
|
||||
#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${NL_NONE_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NL_NONE_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
|
||||
## Debug
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${NL_DEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${NL_DEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
|
||||
## Release
|
||||
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${NL_RELEASE_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${NL_RELEASE_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
|
||||
## RelWithDebInfo
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
|
||||
## MinSizeRel
|
||||
SET(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
||||
ENDMACRO(NL_SETUP_BUILD_FLAGS)
|
||||
|
||||
MACRO(RYZOM_SETUP_PREFIX_PATHS)
|
||||
## Allow override of install_prefix path.
|
||||
IF(NOT RYZOM_PREFIX)
|
||||
IF(WIN32)
|
||||
SET(RYZOM_PREFIX "." CACHE PATH "Installation path")
|
||||
ELSE(WIN32)
|
||||
SET(RYZOM_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE PATH "Installation path")
|
||||
ENDIF(WIN32)
|
||||
ENDIF(NOT RYZOM_PREFIX)
|
||||
|
||||
## Allow override of install_prefix/etc path.
|
||||
IF(NOT RYZOM_ETC_PREFIX)
|
||||
IF(WIN32)
|
||||
SET(RYZOM_ETC_PREFIX "." CACHE PATH "Installation path for configurations")
|
||||
ELSE(WIN32)
|
||||
SET(RYZOM_ETC_PREFIX "${CMAKE_INSTALL_PREFIX}/etc/ryzom" CACHE PATH "Installation path for configurations")
|
||||
ENDIF(WIN32)
|
||||
ENDIF(NOT RYZOM_ETC_PREFIX)
|
||||
|
||||
## Allow override of install_prefix/share path.
|
||||
IF(NOT RYZOM_SHARE_PREFIX)
|
||||
IF(WIN32)
|
||||
SET(RYZOM_SHARE_PREFIX "." CACHE PATH "Installation path for data.")
|
||||
ELSE(WIN32)
|
||||
SET(RYZOM_SHARE_PREFIX "${CMAKE_INSTALL_PREFIX}/share/ryzom" CACHE PATH "Installation path for data.")
|
||||
ENDIF(WIN32)
|
||||
ENDIF(NOT RYZOM_SHARE_PREFIX)
|
||||
|
||||
## Allow override of install_prefix/sbin path.
|
||||
IF(NOT RYZOM_SBIN_PREFIX)
|
||||
IF(WIN32)
|
||||
SET(RYZOM_SBIN_PREFIX "." CACHE PATH "Installation path for admin tools and services.")
|
||||
ELSE(WIN32)
|
||||
SET(RYZOM_SBIN_PREFIX "${CMAKE_INSTALL_PREFIX}/sbin" CACHE PATH "Installation path for admin tools and services.")
|
||||
ENDIF(WIN32)
|
||||
ENDIF(NOT RYZOM_SBIN_PREFIX)
|
||||
|
||||
## Allow override of install_prefix/bin path.
|
||||
IF(NOT RYZOM_BIN_PREFIX)
|
||||
IF(WIN32)
|
||||
SET(RYZOM_BIN_PREFIX "." CACHE PATH "Installation path for tools and applications.")
|
||||
ELSE(WIN32)
|
||||
SET(RYZOM_BIN_PREFIX "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation path for client and tools.")
|
||||
ENDIF(WIN32)
|
||||
ENDIF(NOT RYZOM_BIN_PREFIX)
|
||||
|
||||
ENDMACRO(RYZOM_SETUP_PREFIX_PATHS)
|
Loading…
Reference in a new issue