MESSAGE(STATUS "* BBTK_CMAKE_REL_PATH = ${BBTK_CMAKE_REL_PATH}")
ENDIF(FIND_PACKAGE_VERBOSE)
+
+SET(CREA_VERBOSE_CMAKE TRUE)
+IF (NOT crea_FOUND)
+FIND_PACKAGE(crea REQUIRED)
+IF (crea_FOUND)
+ INCLUDE(${crea_USE_FILE})
+ENDIF(crea_FOUND)
+ENDIF(NOT crea_FOUND)
+
+
# If bbtk was compiled with WxWidget then have to find it
IF(BBTK_BUILT_WITH_WX)
- INCLUDE(${BBTK_CMAKE_DIR}/BBTKWxWidgets.cmake)
- BBTK_FIND_WXWIDGETS()
+ INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_FindAndUseWxWidgets.cmake)
+ CREA_FIND_WXWIDGETS()
ENDIF(BBTK_BUILT_WITH_WX)
# If bbtk was compiled with WxWidget then have to use it
IF(BBTK_BUILT_WITH_WX)
- BBTK_USE_WXWIDGETS()
+ CREA_USE_WXWIDGETS()
ENDIF(BBTK_BUILT_WITH_WX)
# Construct absolute build path
SET(BUILD_PATH ${BBTK_DOC_BUILD_PATH}/${OUTPUT_REL_PATH})
#-------------------------------------------------------------------------
- ## MESSAGE(STATUS ${LATEX_tth_CONVERTER})
ADD_CUSTOM_COMMAND(
OUTPUT ${BUILD_PATH}/${TEX_FILE}.html
COMMAND
# tth
- ${LATEX_tth_CONVERTER}
+ ${TTH_EXECUTABLE}
ARGS
-e2 ${BUILD_PATH}/${TEX_FILE}.tex 2>tth.log
# DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${TEX_FILE}.pdf
TARGETS bb${BBTK_PACKAGE_NAME}
DESTINATION ${BBTK_PACKAGE_LIB_PATH})
-# CreateFindPackage
+# Preparing macro invocation : CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE
SET( LIBRARY_NAME bb${BBTK_PACKAGE_NAME} )
# SET THE LIB VERSION
SET(${LIBRARY_NAME}_MAJOR_VERSION ${${BBTK_PACKAGE_NAME}_MAJOR_VERSION})
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
-# Includes CMakeCreateFindPackage
-INCLUDE(${CMakeCreateFindPackage_DIR}/CMakeCreateFindPackage.cmake)
-CMAKE_CREATE_FIND_PACKAGE(${LIBRARY_NAME})
+CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE(${LIBRARY_NAME})
#-----------------------------------------------------------------------------
#----------------------------------------------------------------------------
+++ /dev/null
-
-# for CMake 2.6
-IF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4)
- # technically those packages are not required
- # since one can still use the Motif/X11 version and not the gtk one:
- FIND_PACKAGE(PkgConfig)
- pkg_check_modules (GTK2 gtk+-2.0)
- #MESSAGE("${GTK2_INCLUDE_DIRS}")
-
-# older CMake
-ELSE(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4)
-
-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 _GTK22IncDir _GTK22LinkDir _GTK22LinkFlags _GTK22Cflags)
-
- FIND_PATH(GTK2_GTK_INCLUDE_PATH gtk/gtk.h
- $ENV{GTK2_HOME}
- ${_GTK22IncDir}
- /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
- )
-
- # 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 _GLIB2inkDir _GLIB2LinkFlags _GLIB2Cflags)
- PKGCONFIG(gmodule-2.0 _GMODULE2IncDir _GMODULE2inkDir _GMODULE2LinkFlags _GMODULE2Cflags)
- SET(GDIR /opt/gnome/lib/glib-2.0/include)
-
- FIND_PATH(GTK2_GLIBCONFIG_INCLUDE_PATH glibconfig.h
- ${_GLIB2IncDir}
- /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
- )
- #MESSAGE(STATUS "DEBUG: GTK2_GLIBCONFIG_INCLUDE_PATH = ${GTK2_GLIBCONFIG_INCLUDE_PATH}")
-
- FIND_PATH(GTK2_GLIB_INCLUDE_PATH glib.h
- ${_GLIB2IncDir}
- /opt/include/glib-2.0
- /opt/gnome/include/glib-2.0
- /usr/include/glib-2.0
- /sw/include/glib-2.0
- )
- #MESSAGE(STATUS "DEBUG: GTK2_GLIBCONFIG_INCLUDE_PATH = ${GTK2_GLIBCONFIG_INCLUDE_PATH}")
-
- FIND_PATH(GTK2_GTKGL_INCLUDE_PATH gtkgl/gtkglarea.h
- ${_GLIB2IncDir}
- /usr/include
- /usr/local/include
- /usr/openwin/share/include
- /opt/gnome/include
- /opt/include
- /sw/include
- )
-
- PKGCONFIG(pango _PANGOIncDir _PANGOinkDir _PANGOLinkFlags _PANGOCflags)
-
- FIND_PATH(GTK2_PANGO_INCLUDE_PATH pango/pango.h
- ${_PANGOIncDir}
- /opt/gnome/include/pango-1.0
- /opt/include/pango-1.0
- /usr/include/pango-1.0
- /sw/include/pango-1.0
- )
-
- PKGCONFIG(gdk-2.0 _GDK2IncDir _GDK2inkDir _GDK2LinkFlags _GDK2Cflags)
-
- FIND_PATH(GTK2_GDKCONFIG_INCLUDE_PATH gdkconfig.h
- ${_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
- )
-
- # Dave:
- FIND_PATH(GTK2_GDK_INCLUDE_PATH gdk.h
- ${_GDK2IncDir}
- /usr/include/gtk-2.0
- /usr/include/gtk-2.0/gdk
- )
- #MESSAGE(STATUS "DEBUG: GTK2_GLIBCONFIG_INCLUDE_PATH = ${GTK2_GLIBCONFIG_INCLUDE_PATH}")
-
- PKGCONFIG(cairo _CAIROIncDir _CAIROinkDir _CAIROLinkFlags _CAIROCflags)
-
- FIND_PATH(GTK2_CAIRO_INCLUDE_PATH cairo.h
- ${_CAIROIncDir}
- /opt/gnome/include/cairo
- /usr/include
- /usr/include/cairo
- /opt/include
- /opt/include/cairo
- /sw/include
- /sw/include/cairo
- )
- #MESSAGE(STATUS "DEBUG: GTK2_CAIRO_INCLUDE_PATH = ${GTK2_CAIRO_INCLUDE_PATH}")
-
- PKGCONFIG(atk _ATKIncDir _ATKinkDir _ATKLinkFlags _ATKCflags)
-
- FIND_PATH(GTK2_ATK_INCLUDE_PATH atk/atk.h
- ${_ATKIncDir}
- /opt/gnome/include/atk-1.0
- /usr/include/atk-1.0
- /opt/include/atk-1.0
- /sw/include/atk-1.0
- )
- #MESSAGE(STATUS "DEBUG: GTK2_ATK_INCLUDE_PATH = ${GTK2_ATK_INCLUDE_PATH}")
-
- FIND_LIBRARY(GTK2_GTKGL_LIBRARY
- NAMES
- gtkgl
- PATHS
- ${_GTK22IncDir}
- /usr/lib
- /usr/local/lib
- /usr/openwin/lib
- /usr/X11R6/lib
- /opt/gnome/lib
- /opt/lib
- /sw/lib
- )
-
- FIND_LIBRARY(GTK2_GTK_LIBRARY
- NAMES
- gtk-x11-2.0
- PATHS
- ${_GTK22LinkDir}
- /usr/lib
- /usr/local/lib
- /usr/openwin/lib
- /usr/X11R6/lib
- /opt/gnome/lib
- /opt/lib
- /sw/lib
- )
-
- 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
- )
-
- FIND_LIBRARY(GTK2_GMODULE_LIBRARY
- NAMES
- gmodule-2.0
- PATHS
- ${_GMODULE2inkDir}
- /usr/lib
- /usr/local/lib
- /usr/openwin/lib
- /usr/X11R6/lib
- /opt/gnome/lib
- /opt/lib
- /sw/lib
- )
-
- FIND_LIBRARY(GTK2_GLIB_LIBRARY
- NAMES
- glib-2.0
- PATHS
- ${_GLIB2inkDir}
- /usr/lib
- /usr/local/lib
- /usr/openwin/lib
- /usr/X11R6/lib
- /opt/gnome/lib
- /opt/lib
- /sw/lib
- )
-
- FIND_LIBRARY(GTK2_Xi_LIBRARY
- NAMES
- Xi
- PATHS
- /usr/lib
- /usr/local/lib
- /usr/openwin/lib
- /usr/X11R6/lib
- /opt/gnome/lib
- /opt/lib
- /sw/lib
- )
-
- FIND_LIBRARY(GTK2_GTHREAD_LIBRARY
- NAMES
- gthread-2.0
- PATHS
- /usr/lib
- /usr/local/lib
- /usr/openwin/lib
- /usr/X11R6/lib
- /opt/gnome/lib
- /opt/lib
- /sw/lib
- )
-
-
- FIND_LIBRARY(GTK2_GOBJECT_LIBRARY
- NAMES
- gobject-2.0
- PATHS
- /usr/lib
- /usr/local/lib
- /usr/openwin/lib
- /usr/X11R6/lib
- /opt/gnome/lib
- /opt/lib
- /sw/lib
- )
-
- IF(GTK2_GTK_INCLUDE_PATH)
- IF(GTK2_GLIBCONFIG_INCLUDE_PATH)
- IF(GTK2_GLIB_INCLUDE_PATH)
- IF(GTK2_GTK_LIBRARY)
- IF(GTK2_GLIB_LIBRARY)
- IF(GTK2_PANGO_INCLUDE_PATH)
- IF(GTK2_ATK_INCLUDE_PATH)
- IF(GTK2_CAIRO_INCLUDE_PATH)
- # Assume that if gtk and glib were found, the other
- # supporting libraries have also been found.
-
- SET(GTK2_FOUND TRUE)
-
- SET(GTK2_INCLUDE_DIRS
- ${GTK2_GTK_INCLUDE_PATH}
- ${GTK2_GLIBCONFIG_INCLUDE_PATH}
- ${GTK2_GLIB_INCLUDE_PATH}
- ${GTK2_PANGO_INCLUDE_PATH}
- ${GTK2_GDKCONFIG_INCLUDE_PATH}
- # Dave:
- ${GTK2_GDK_INCLUDE_PATH}
- ${GTK2_ATK_INCLUDE_PATH}
- ${GTK2_CAIRO_INCLUDE_PATH}
- )
-
- SET(GTK2_LIBRARIES
- ${GTK2_GTK_LIBRARY}
- ${GTK2_GDK_LIBRARY}
- ${GTK2_GLIB_LIBRARY}
- )
- #${GTK2_GOBJECT_LIBRARY})
-
- IF(GTK2_GMODULE_LIBRARY)
- SET(GTK2_LIBRARIES
- ${GTK2_LIBRARIES}
- ${GTK2_GMODULE_LIBRARY}
- )
- ENDIF(GTK2_GMODULE_LIBRARY)
-
- IF(GTK2_GTHREAD_LIBRARY)
- SET(GTK2_LIBRARIES
- ${GTK2_LIBRARIES}
- ${GTK2_GTHREAD_LIBRARY}
- )
- SET(GTK2_LIBRARIES ${GTK2_LIBRARIES})
- ENDIF(GTK2_GTHREAD_LIBRARY)
- ELSE(GTK2_CAIRO_INCLUDE_PATH)
- MESSAGE(STATUS "Can not find cairo")
- ENDIF(GTK2_CAIRO_INCLUDE_PATH)
- ELSE(GTK2_ATK_INCLUDE_PATH)
- MESSAGE(STATUS "Can not find atk")
- ENDIF(GTK2_ATK_INCLUDE_PATH)
- ELSE(GTK2_PANGO_INCLUDE_PATH)
- MESSAGE(STATUS "Can not find pango includes")
- ENDIF(GTK2_PANGO_INCLUDE_PATH)
- ELSE(GTK2_GLIB_LIBRARY)
- MESSAGE(STATUS "Can not find glib lib")
- ENDIF(GTK2_GLIB_LIBRARY)
- ELSE(GTK2_GTK_LIBRARY)
- MESSAGE(STATUS "Can not find gtk lib")
- ENDIF(GTK2_GTK_LIBRARY)
- ELSE(GTK2_GLIB_INCLUDE_PATH)
- MESSAGE(STATUS "Can not find glib includes")
- ENDIF(GTK2_GLIB_INCLUDE_PATH)
- ELSE(GTK2_GLIBCONFIG_INCLUDE_PATH)
- MESSAGE(STATUS "Can not find glibconfig")
- ENDIF(GTK2_GLIBCONFIG_INCLUDE_PATH)
- ELSE (GTK2_GTK_INCLUDE_PATH)
- MESSAGE(STATUS "Can not find gtk includes")
- ENDIF (GTK2_GTK_INCLUDE_PATH)
-
- IF (GTK2_FOUND)
- IF (NOT GTK2_FIND_QUIETLY)
- MESSAGE(STATUS "Looking for gtk2... - found ${GTK2_LIBRARIES}")
- ENDIF (NOT GTK2_FIND_QUIETLY)
- ELSE (GTK2_FOUND)
- IF (GTK2_FIND_REQUIRED)
- MESSAGE(SEND_ERROR "Could NOT find GTK2")
- ENDIF (GTK2_FIND_REQUIRED)
- ENDIF (GTK2_FOUND)
-
- MARK_AS_ADVANCED(
- GTK2_GDK_LIBRARY
- GTK2_GLIB_INCLUDE_PATH
- GTK2_GLIB_LIBRARY
- GTK2_GLIBCONFIG_INCLUDE_PATH
- GTK2_GMODULE_LIBRARY
- GTK2_GTHREAD_LIBRARY
- GTK2_Xi_LIBRARY
- GTK2_GTK_INCLUDE_PATH
- GTK2_GTK_LIBRARY
- GTK2_GTKGL_INCLUDE_PATH
- GTK2_GTKGL_LIBRARY
- GTK2_ATK_INCLUDE_PATH
- GTK2_GDKCONFIG_INCLUDE_PATH
- # Dave:
- GTK2_GDK_INCLUDE_PATH
- #GTK2_GOBJECT_LIBRARY
- GTK2_PANGO_INCLUDE_PATH
- # LG :
- GTK2_CAIRO_INCLUDE_PATH
- GTK2_GOBJECT_LIBRARY
- )
- ENDIF(UNIX)
-ENDIF (GTK2_LIBRARIES AND GTK2_INCLUDE_DIRS)
-
-ENDIF(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4)
+++ /dev/null
-#
-# FindwxW.cmake
-# v1.06 2006-03-27
-# Jerry Fath 2005
-# Based on work by Jorgen Bodde
-#
-# This module finds if wxWindows is installed and determines where the
-# include files and libraries are. It also determines what the name of
-# the library is. This code sets the following variables:
-#
-# WXWIDGETS_FOUND = wxWidgets was found
-# WXWIDGETS_ROOT_DIR = base wxWidgets directory
-# WXWIDGETS_LINK_DIRECTORIES = link directories, useful for rpath on Unix
-# WXWIDGETS_LIBRARIES = all the wxWindows libraries ( and linker flags on unix )
-# WXWIDGETS_CXX_FLAGS = compiler flags for building wxWindows
-# WXWIDGETS_EXE_LINKER_FLAGS = compiler flags for building wxWindows
-# WXWIDGETS_INCLUDE_DIR = all include path of wxWindows
-# WXWIDGETS_DEFINITIONS = all flags of wxWindows
-#
-# WXWIDGETS_RELEASE_LIBRARIES = release wxWindows libraries (Win32 only)
-# WXWIDGETS_DEBUG_LIBRARIES = debug wxWindows libraries (Win32 only)
-# WXWIDGETS_COMMON_LIBRARIES = libraries common to Release and Debug (Win32 only)
-
-# NOTE: This module REQUIRES that an environment variable named WXWIN
-# be set to the base wxWidgets installation directory.
-# Under Unix, you must also set and environment variable named WXWINCFG
-# to the name of the active build subdirectory (eg buildgtk). As an alternative
-# to the WXWINCFG environment variable, you can set a sym link in the wxWidgets
-# root directory called wx-config which points to the active build subdirectory.
-#
-
-# These variable should be set before including this module
-#
-# WXWIDGETS_FILE_VERSION (26)
-# WXWIDGETS_VERSION (2.6)
-#
-#
-
-####################### EXAMPLE CMakeLists.txt ###################
-#
-##Required project specific settings
-#PROJECT( myprojectname )
-#SET(PROJECT_SOURCE_FILES myfile.cpp myfile2.cpp)
-#IF( WIN32)
-# SET(PROJECT_RC_FILE myresfile.rc)
-#ELSE( WIN32)
-# SET(PROJECT_RC_FILE "")
-#ENDIF( WIN32)
-#
-##Optional project specific settings
-#SET(PROJECT_DEFINITIONS -D_MYPROJECT_ -D_MYPROJECT2_)
-#SET(PROJECT_INCLUDE_PATH e:/myproject/include e:/myproject2/include)
-#SET(PROJECT_LINK_DIRECTORIES e:/myproject/lib e:/myproject2/lib)
-#SET(PROJECT_LIBRARIES myprojectlib myproject2lib)
-#
-##wxWidgets build related stuff
-#SET(WXW_USE_DEBUG OFF)
-#SET(WXW_USE_UNICODE OFF)
-#SET(WXW_USE_SHARED OFF)
-#SET(WXW_USE_UNIV OFF)
-#SET(WXW_USE_MONO OFF)
-#SET(WXW_FILE_VERSION "26")
-#SET(WXW_VERSION "2.6")
-#
-#INCLUDE (FindwxW)
-#INCLUDE (UsewxW)
-#
-####################### END EXAMPLE CMakeLists.txt ###################
-
-#
-# Set WX_USE vars in CMakeLists if you don't want to default to all off
-#
-SET(WXWIDGETS_USE_DEBUG ${WXW_USE_DEBUG} CACHE BOOL "Use Debug versions of wxWindows libraries")
-SET(WXWIDGETS_USE_UNICODE ${WXW_USE_UNICODE} CACHE BOOL "Use Unicode versions of wxWindows libraries")
-SET(WXWIDGETS_USE_SHARED ${WXW_USE_SHARED} CACHE BOOL "Use shared versions of wxWindows libraries")
-SET(WXWIDGETS_USE_UNIV ${WXW_USE_UNIV} CACHE BOOL "Use Universal versions of wxWindows libraries")
-SET(WXWIDGETS_USE_MONO ${WXW_USE_MONO} CACHE BOOL "Use monolithic versions of wxWindows libraries")
-
-#
-# Style can be non-Win32 even under Windows when using MinGW
-#
-IF(WIN32)
- SET(WIN32_STYLE_FIND 1)
-ENDIF(WIN32)
-IF(MINGW)
- SET(WIN32_STYLE_FIND 0)
- SET(UNIX_STYLE_FIND 1)
-ENDIF(MINGW)
-IF(UNIX)
- SET(UNIX_STYLE_FIND 1)
-ENDIF(UNIX)
-
-#
-# Versions should be set before this file is included. If not,
-# default to 2.6
-#
-IF(WXW_FILE_VERSION)
- SET( WXVERSIONSUFFIX ${WXW_FILE_VERSION})
-ELSE(WXW_FILE_VERSION)
- SET( WXVERSIONSUFFIX "26")
-ENDIF(WXW_FILE_VERSION)
-
-IF(WXW_VERSION)
- SET( WXVERSION ${WXW_VERSION})
-ELSE(WXW_VERSION)
- SET( WXVERSION "2.6")
-ENDIF(WXW_VERSION)
-
-#
-# Find the base wxWidgets install path
-# NOTE: WXWIN must be set
-#
-FIND_PATH( WXWIDGETS_ROOT_DIR
- wx-config.in
- $ENV{WXWIN}
-)
-IF(WXWIDGETS_ROOT_DIR STREQUAL "WXWIDGETS_ROOT_DIR-NOTFOUND")
- MESSAGE( FATAL_ERROR "FATAL_ERROR: wx-config.in NOT found. Set WXWIN")
-ENDIF(WXWIDGETS_ROOT_DIR STREQUAL "WXWIDGETS_ROOT_DIR-NOTFOUND")
-SET(WXWIDGETS_CONFIG_PATH ${WXWIDGETS_ROOT_DIR})
-
-#
-# Find library path (platform specific)
-#
-IF( WIN32_STYLE_FIND )
-
- IF( WXWIDGETS_USE_SHARED )
- SET(WXWIDGETS_LIB_PATH "${WXWIDGETS_ROOT_DIR}/lib/vc_dll" )
- ELSE( WXWIDGETS_USE_SHARED )
- SET(WXWIDGETS_LIB_PATH "${WXWIDGETS_ROOT_DIR}/lib/vc_lib" )
- ENDIF( WXWIDGETS_USE_SHARED )
- SET( WXWIDGETS_LINK_DIRECTORIES ${WXWIDGETS_LIB_PATH} )
-
-ELSE( WIN32_STYLE_FIND )
- IF (UNIX_STYLE_FIND)
-
- #
- # Unix uses a config specific directory under the install path
- # specified in the WXWINCFG environment variable.
- # If the WXWINCFG variable isn't set, we try a sym link within
- # the WX root dir called wx-config, or the current PATH
- #
- FIND_PROGRAM( WX_WXCONFIG_EXECUTABLE
- wx-config
- "${WXWIDGETS_ROOT_DIR}/$ENV{WXWINCFG}"
- "${WXWIDGETS_ROOT_DIR}/wx-config" )
- #
- # Check wether wx-config can be found
- #
- IF(NOT EXISTS ${WX_WXCONFIG_EXECUTABLE})
- # we really need wx-config...
- MESSAGE(FATAL_ERROR "FATAL_ERROR: Cannot find wx-config. Set WXWIN and WXWINCFG environment variables.")
- ENDIF(NOT EXISTS ${WX_WXCONFIG_EXECUTABLE})
-
- GET_FILENAME_COMPONENT( WXWIDGETS_CONFIG_PATH
- WX_WXCONFIG_EXECUTABLE
- PATH )
-
- SET(WXWIDGETS_LIB_PATH "${WXWIDGETS_CONFIG_PATH}/lib" )
- SET( WXWIDGETS_LINK_DIRECTORIES ${WXWIDGETS_LIB_PATH} )
-
- ELSE(UNIX_STYLE_FIND)
- MESSAGE(FATAL_ERROR "FATAL_ERROR: FindwxWindows.cmake: Platform unsupported by FindwxW.cmake. It's neither WIN32 nor UNIX")
- ENDIF(UNIX_STYLE_FIND)
-ENDIF( WIN32_STYLE_FIND )
-
-#
-# Check options against installed libraries
-#
-SET(WX_CONFIG_ARGS "")
-SET( LIBRARYWANT "${WXWIDGETS_LIB_PATH}/msw" )
-
-IF( WXWIDGETS_USE_UNIV )
- SET( LIBRARYWANT "${LIBRARYWANT}univ")
- SET( PFUNIV "univ" )
- SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --universal=yes")
-ELSE( WXWIDGETS_USE_UNIV )
- SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --universal=no")
-ENDIF( WXWIDGETS_USE_UNIV )
-
-IF( WXWIDGETS_USE_UNICODE )
- SET( LIBRARYWANT "${LIBRARYWANT}u" )
- SET( PFUNICODE "u" )
- SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --unicode=yes")
-ELSE( WXWIDGETS_USE_UNICODE )
- SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --unicode=no")
-ENDIF( WXWIDGETS_USE_UNICODE )
-
-IF( WXWIDGETS_USE_DEBUG )
- SET( PFDEBUG "d" )
- SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --debug=yes")
-ELSE( WXWIDGETS_USE_DEBUG )
- SET( PFDEBUG "" )
- SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --debug=no")
-ENDIF( WXWIDGETS_USE_DEBUG )
-
-IF( WXWIDGETS_USE_SHARED )
- SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --static=no")
-ELSE( WXWIDGETS_USE_SHARED )
- SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --static=yes")
-ENDIF( WXWIDGETS_USE_SHARED )
-
-# Not sure how to check this yet!!!!!
-IF( WXWIDGETS_USE_MONO )
- SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS}")
-ELSE( WXWIDGETS_USE_MONO )
- SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS}")
-ENDIF( WXWIDGETS_USE_MONO )
-
-SET(WX_CONFIG_ARGS_LIBS "${WX_CONFIG_ARGS} --libs")
-
-#
-# Platform specific method for testing installed wx Builds
-#
-IF( WIN32_STYLE_FIND )
-
- #
- # See if we have both release and debug wx versions
- #
- SET ( WX_DEBUGANDRELEASE FALSE )
- IF( EXISTS "${LIBRARYWANT}/wx/setup.h" )
- IF( EXISTS "${LIBRARYWANT}d/wx/setup.h" )
- SET ( WX_DEBUGANDRELEASE TRUE )
- ENDIF( EXISTS "${LIBRARYWANT}d/wx/setup.h" )
- ENDIF( EXISTS "${LIBRARYWANT}/wx/setup.h" )
-
- SET( LIBRARYWANT "${LIBRARYWANT}${PFDEBUG}" )
- IF( NOT EXISTS "${LIBRARYWANT}/wx/setup.h" )
- MESSAGE( SEND_ERROR "ERROR: WXWidgets config NOT found ${WX_CONFIG_ARGS}")
- ENDIF( NOT EXISTS "${LIBRARYWANT}/wx/setup.h" )
-
-ELSE( WIN32_STYLE_FIND )
-
- EXEC_PROGRAM(${WX_WXCONFIG_EXECUTABLE}
- ARGS ${WX_CONFIG_ARGS_LIBS}
- OUTPUT_VARIABLE WXWIDGETS_LIBRARIES
- RETURN_VALUE BAD_WXCONFIG )
- IF(BAD_WXCONFIG)
- MESSAGE( SEND_ERROR "ERROR: WXWidgets config NOT found ${WX_CONFIG_ARGS}")
- ENDIF(BAD_WXCONFIG)
-
-ENDIF( WIN32_STYLE_FIND )
-
-#
-# Get compiler flags
-#
-IF( WIN32_STYLE_FIND )
- # Not used for Windows
- SET( WXWIDGETS_CXX_FLAGS "" )
-ELSE( WIN32_STYLE_FIND )
- #
- # Get CXXFLAGS from wx-config
- #
- EXEC_PROGRAM(${WX_WXCONFIG_EXECUTABLE}
- ARGS "--cxxflags"
- OUTPUT_VARIABLE WXWIDGETS_CXX_FLAGS
- RETURN_VALUE BAD_WXCONFIG )
- IF (BAD_WXCONFIG)
- MESSAGE( SEND_ERROR "ERROR: wx-config --cxxflags returned an error")
- ENDIF (BAD_WXCONFIG)
-ENDIF( WIN32_STYLE_FIND )
-
-#
-# Find include directories (platform specific)
-#
-IF( WIN32_STYLE_FIND )
- #
- # Set non-build specific include directories
- #
- SET ( WX_INCLUDE_PATH ${WXWIDGETS_ROOT_DIR}/include )
- SET ( WXWIDGETS_INCLUDE_DIR ${WX_INCLUDE_PATH} )
- SET( WXWIDGETS_INCLUDE_DIR ${WXWIDGETS_INCLUDE_DIR} ${WXWIDGETS_INCLUDE_DIR}/../contrib/include )
- #
- # Append the build specific include dir for wx/setup.h:
- #
- IF ( EXISTS ${LIBRARYWANT}/wx/setup.h )
- SET( WX_INCLUDE_LIB_PATH ${LIBRARYWANT})
- SET( WXWIDGETS_INCLUDE_DIR ${WXWIDGETS_INCLUDE_DIR} ${LIBRARYWANT} )
- ELSE ( EXISTS ${LIBRARYWANT}/wx/setup.h )
- SET( WX_INCLUDE_LIB_PATH, "")
- MESSAGE(SEND_ERROR "ERROR: Can't find ${LIBRARYWANT}/wx/setup.h")
- ENDIF ( EXISTS ${LIBRARYWANT}/wx/setup.h )
-
-ELSE( WIN32_STYLE_FIND )
-
- # Pull out -I options
- # evaluate wx-config output to separate include dirs
- SET(WX_INCLUDE_DIR ${WXWIDGETS_CXX_FLAGS})
- # extract include dirs (-I)
- # use regular expression to match wildcard equivalent "-I*<endchar>"
- # with <endchar> is a space or a semicolon
- STRING(REGEX MATCHALL "[-][I]([^ ;])+" WX_INCLUDE_DIRS_WITH_PREFIX "${WX_INCLUDE_DIR}" )
- # remove prefix -I because we need the pure directory
- IF(WX_INCLUDE_DIRS_WITH_PREFIX)
- STRING(REGEX REPLACE "[-][I]" ";" WXWIDGETS_INCLUDE_DIR ${WX_INCLUDE_DIRS_WITH_PREFIX} )
- ENDIF(WX_INCLUDE_DIRS_WITH_PREFIX)
- # replace space separated string by semicolon separated vector
- SEPARATE_ARGUMENTS(WXWIDGETS_INCLUDE_DIR)
- # Remove the -I options from the CXX_FLAGS no need to duplicate
- STRING(REGEX REPLACE "[-][I]([^ ;])+" "" WXWIDGETS_CXX_FLAGS ${WXWIDGETS_CXX_FLAGS} )
-
- #
- # Find XWindows
- #
- IF( NOT CYGWIN OR MINGW )
- INCLUDE( ${CMAKE_ROOT}/Modules/FindX11.cmake )
- SET( WXWIDGETS_INCLUDE_DIR ${WXWIDGETS_INCLUDE_DIR} ${X11_INCLUDE_DIR} )
- ENDIF( NOT CYGWIN OR MINGW )
-ENDIF( WIN32_STYLE_FIND )
-
-#
-# Find library list (platform specific)
-#
-IF( WIN32_STYLE_FIND )
- #
- #Misc vars used to build lib names
- #
- SET( PFLIBEXT ${CMAKE_STATIC_LIBRARY_SUFFIX} )
- SET( WXPF "${WXPF}${WXVERSIONSUFFIX}" )
- SET( PFVERSION ${WXVERSIONSUFFIX} )
- SET( PFCOMPILER "" )
-
- #
- # Build the libraries list
- #
- SET( WX_TOKEN_LIBS "" )
- SET( WX_MULTI_LIBRARIES "" )
- SET( WX_MONO_LIBRARIES "" )
- SET( WX_DEBUG_TOKEN "@1" )
-
- #start filling library string with needed libraries for the choosen configuration.
- #note we use tokens for debug/release and the debug suffix so we can replace later
- SET( WXPF "${PFVERSION}${PFUNICODE}${WX_DEBUG_TOKEN}" )
- SET(WX_MULTI_LIBRARIES ${WX_MULTI_LIBRARIES}
- wxbase${WXPF}${PFCOMPILER}${PFLIBEXT}
- wxbase${WXPF}_net${PFCOMPILER}${PFLIBEXT}
- wxbase${WXPF}_xml${PFCOMPILER}${PFLIBEXT}
- )
-
- SET( WXPF "${PFVERSION}${PFUNICODE}${WX_DEBUG_TOKEN}" )
- SET(WX_MULTI_LIBRARIES ${WX_MULTI_LIBRARIES}
- wxmsw${WXPF}_adv${PFCOMPILER}${PFLIBEXT}
- wxmsw${WXPF}_core${PFCOMPILER}${PFLIBEXT}
- wxmsw${WXPF}_html${PFCOMPILER}${PFLIBEXT}
- wxmsw${WXPF}_xrc${PFCOMPILER}${PFLIBEXT}
- )
- IF (WXWIDGETS_USE_MEDIA)
- SET(WX_MULTI_LIBRARIES ${WX_MULTI_LIBRARIES}
- wxmsw${WXPF}_media${PFCOMPILER}${PFLIBEXT}
- )
- ENDIF (WXWIDGETS_USE_MEDIA)
-
- IF( NOT WXWIDGETS_USE_SHARED )
- SET( WXPF "${PFVERSION}${PFUNICODE}${WX_DEBUG_TOKEN}" )
- IF (WXWIDGETS_USE_ODBC)
- SET(WX_MULTI_LIBRARIES ${WX_MULTI_LIBRARIES}
- wxbase${WXPF}_odbc${PFCOMPILER}${PFLIBEXT}
- )
- ENDIF (WXWIDGETS_USE_ODBC)
-
- SET( WXPF "${PFVERSION}${PFUNICODE}${WX_DEBUG_TOKEN}" )
- IF (WXWIDGETS_USE_DBGRID)
- SET(WX_MULTI_LIBRARIES ${WX_MULTI_LIBRARIES}
- wxmsw${WXPF}_dbgrid${PFLIBEXT}
- )
- ENDIF (WXWIDGETS_USE_DBGRID)
- IF (WXWIDGETS_USE_GL)
- SET(WX_MULTI_LIBRARIES ${WX_MULTI_LIBRARIES}
- wxmsw${WXPF}_gl${PFCOMPILER}${PFLIBEXT}
- )
- ENDIF (WXWIDGETS_USE_GL)
- ENDIF( NOT WXWIDGETS_USE_SHARED )
-
- IF ( WXWIDGETS_USE_UNIV )
- SET( WXPF "${PFUNIV}${PFVERSION}${PFUNICODE}${WX_DEBUG_TOKEN}" )
- SET(WX_MULTI_LIBRARIES ${WX_MULTI_LIBRARIES}
- wxmsw${WXPF}_core${PFCOMPILER}${PFLIBEXT}
- )
- ENDIF ( WXWIDGETS_USE_UNIV )
-
- SET(WX_MONO_LIBRARIES ${WX_MONO_LIBRARIES}
- wxmsw${WXPF}${PFCOMPILER}${PFLIBEXT}
- )
-
- IF ( WXWIDGETS_USE_MONO )
- SET(WX_TOKEN_LIBS ${WX_TOKEN_LIBS} ${WX_MONO_LIBRARIES})
- ELSE ( WXWIDGETS_USE_MONO )
- SET(WX_TOKEN_LIBS ${WX_TOKEN_LIBS} ${WX_MULTI_LIBRARIES})
- ENDIF ( WXWIDGETS_USE_MONO )
-
- SET( WXPF "${PFUNICODE}${WX_DEBUG_TOKEN}" )
- SET(WX_TOKEN_LIBS ${WX_TOKEN_LIBS}
- wxregex${WXPF}.lib
- )
-
- SET( WXPF "${WX_DEBUG_TOKEN}" )
- SET(WX_TOKEN_LIBS ${WX_TOKEN_LIBS}
- wxexpat${WXPF}.lib
- wxpng${WXPF}.lib
- wxtiff${WXPF}.lib
- wxjpeg${WXPF}.lib
- wxzlib${WXPF}.lib
- )
-
-
- SET( WXWIDGETS_COMMON_LIBRARIES
- comctl32${PFLIBEXT} wsock32${PFLIBEXT} rpcrt4${PFLIBEXT}
- )
- #
- #Build release/debug lists by replacing tokens
- #
- SET( WXWIDGETS_RELEASE_LIBRARIES "" )
- FOREACH(LOOPLIB ${WX_TOKEN_LIBS})
- SET(WX_TMPLIB ${LOOPLIB})
- STRING(REGEX REPLACE "[@][1]" "" WX_TMPLIB ${WX_TMPLIB} )
- SET( WXWIDGETS_RELEASE_LIBRARIES ${WXWIDGETS_RELEASE_LIBRARIES}
- ${WX_TMPLIB}
- )
- ENDFOREACH(LOOPLIB ${WX_TOKEN_LIBS})
- SET( WXWIDGETS_DEBUG_LIBRARIES "" )
- FOREACH(LOOPLIB ${WX_TOKEN_LIBS})
- SET(WX_TMPLIB ${LOOPLIB})
- STRING(REGEX REPLACE "[@][1]" "d" WX_TMPLIB ${WX_TMPLIB} )
- SET( WXWIDGETS_DEBUG_LIBRARIES ${WXWIDGETS_DEBUG_LIBRARIES}
- ${WX_TMPLIB}
- )
- ENDFOREACH(LOOPLIB ${WX_TOKEN_LIBS})
-
- #
- # Set full lib list to requested type
- #
- IF( WXWIDGETS_USE_DEBUG )
- SET( WXWIDGETS_LIBRARIES ${WXWIDGETS_COMMON_LIBRARIES}
- ${WXWIDGETS_DEBUG_LIBRARIES}
- )
- ELSE( WXWIDGETS_USE_DEBUG )
- SET( WXWIDGETS_LIBRARIES ${WXWIDGETS_COMMON_LIBRARIES}
- ${WXWIDGETS_RELEASE_LIBRARIES}
- )
- ENDIF( WXWIDGETS_USE_DEBUG )
-
- #Not used under Windows
- SET( WXWIDGETS_EXE_LINKER_FLAGS "" )
-
-ELSE( WIN32_STYLE_FIND )
- #
- # Get Library list from wx-config
- #
- # do we need additionial wx GL stuff like GLCanvas ?
- IF(WXWIDGETS_USE_GL)
- SET(WX_CONFIG_ARGS_LIBS "${WX_CONFIG_ARGS_LIBS} --gl-libs" )
- ENDIF(WXWIDGETS_USE_GL)
-
- EXEC_PROGRAM(${WX_WXCONFIG_EXECUTABLE}
- ARGS ${WX_CONFIG_ARGS_LIBS}
- OUTPUT_VARIABLE WX_CONFIGARGS
- RETURN_VALUE BAD_WXCONFIG )
- IF (BAD_WXCONFIG)
- MESSAGE( SEND_ERROR "ERROR: Specified WXWidgets config NOT found")
- ENDIF (BAD_WXCONFIG)
-
- #Pull lib dirs, linker opts, and libs from wx-config --libs return
- SET(WXWIDGETS_LINK_DIRECTORIES "")
- SET(WXWIDGETS_EXE_LINKER_FLAGS "")
- SET(WXWIDGETS_LIBRARIES "")
- SEPARATE_ARGUMENTS(WX_CONFIGARGS)
- FILE( WRITE "${PROJECT_BINARY_DIR}/findwxw-args.log" "WXWIDGETS ARGS\n" )
- FOREACH(WXARG ${WX_CONFIGARGS})
- FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw-args.log" "WXARG: ${WXARG}\n" )
- IF(WXARG MATCHES "^-L")
- SET(WXWIDGETS_LINK_DIRECTORIES ${WXWIDGETS_LINK_DIRECTORIES} ${WXARG})
- ELSE(WXARG MATCHES "^-L")
- IF(WXARG MATCHES "^-l")
- SET(WXWIDGETS_LIBRARIES "${WXWIDGETS_LIBRARIES} ${WXARG}")
- ELSE(WXARG MATCHES "^-l")
- IF(WXARG MATCHES "^-")
- SET(WXWIDGETS_EXE_LINKER_FLAGS "${WXWIDGETS_EXE_LINKER_FLAGS} ${WXARG}")
- ELSE(WXARG MATCHES "^-")
- SET(WXWIDGETS_LIBRARIES "${WXWIDGETS_LIBRARIES} ${WXARG}")
- ENDIF(WXARG MATCHES "^-")
- ENDIF(WXARG MATCHES "^-l")
- ENDIF(WXARG MATCHES "^-L")
- ENDFOREACH(WXARG ${WX_CONFIGARGS})
-
- #Separate library names with ;
- SEPARATE_ARGUMENTS(WXWIDGETS_LIBRARIES)
-
- # remove prefix -L because we need the pure directory for LINK_DIRECTORIES
- # replace -L by ; because the separator seems to be lost otherwise (bug or
- # feature?)
- SET(WX_LINK_DIRECTORIES_WITH_PREFIX ${WXWIDGETS_LINK_DIRECTORIES})
- IF(WX_LINK_DIRECTORIES_WITH_PREFIX)
- STRING(REGEX REPLACE "[-][L]" ";" WXWIDGETS_LINK_DIRECTORIES ${WX_LINK_DIRECTORIES_WITH_PREFIX} )
- #MESSAGE("DBG WXWIDGETS_LINK_DIRECTORIES=${WXWIDGETS_LINK_DIRECTORIES}")
- ENDIF(WX_LINK_DIRECTORIES_WITH_PREFIX)
- # replace space separated string by semicolon separated vector to make it
- # work with LINK_DIRECTORIES
- SEPARATE_ARGUMENTS(WXWIDGETS_LINK_DIRECTORIES)
-
-
- #
- # Unix puts all the libs in the WXWIDGETS_LIBRARIES var
- # We don't know debug/release libs under unix, so we set the
- # common var to full set as well and leave debug/release sets blank
- #
- SET( WXWIDGETS_RELEASE_LIBRARIES "" )
- SET( WXWIDGETS_DEBUG_LIBRARIES "" )
- SET(WXWIDGETS_COMMON_LIBRARIES ${WXWIDGETS_LIBRARIES})
-
-ENDIF( WIN32_STYLE_FIND )
-
-
-#
-# Find wx.rc
-#
-SET( WXWIDGETS_RC ${WXWIDGETS_ROOT_DIR}/include/wx/msw/wx.rc )
-IF( NOT WIN32_STYLE_FIND )
- IF( NOT CYGWIN OR MINGW )
- SET( WXWIDGETS_RC "" )
- ENDIF( NOT CYGWIN OR MINGW )
-ENDIF( NOT WIN32_STYLE_FIND )
-
-#
-# Set preprocessor defs
-#
-STRING(TOUPPER ${CMAKE_SYSTEM_NAME} WX_SYSNAME)
-SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} "-D${WX_SYSNAME}" )
-
-IF(WIN32_STYLE_FIND)
- SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -DWIN32 -D__WXMSW__ )
-ELSE(WIN32_STYLE_FIND)
- IF( CYGWIN )
- SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -D__GNUWIN32__ -O2 -D_WIN32_IE=0x400 -MMD -Wall )
- ENDIF( CYGWIN )
-ENDIF(WIN32_STYLE_FIND)
-
-IF( WXWIDGETS_USE_SHARED )
- SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -DWXUSINGDLL )
-ENDIF( WXWIDGETS_USE_SHARED )
-
-IF( WXWIDGETS_USE_DEBUG )
- SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -D_DEBUG_ -D__WXDEBUG__ -DWXDEBUG=1 )
-ENDIF( WXWIDGETS_USE_DEBUG )
-
-IF ( WXWIDGETS_USE_UNICODE )
- SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -DwxUSE_UNICODE )
-ENDIF ( WXWIDGETS_USE_UNICODE )
-
-#
-# Set the WXWIDGETS_FOUND var
-#
-IF(WXWIDGETS_LIBRARIES AND WXWIDGETS_INCLUDE_DIR)
- SET(WXWIDGETS_FOUND 1)
-ENDIF(WXWIDGETS_LIBRARIES AND WXWIDGETS_INCLUDE_DIR)
-
-#
-# Mark advanced vars
-#
-MARK_AS_ADVANCED(WXWIDGETS_ROOT_DIR)
-
-#
-# Log results
-#
-FILE( WRITE "${PROJECT_BINARY_DIR}/findwxw.log" "FindwxW.cmake version 1.06\n" )
-FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_FOUND: ${WXWIDGETS_FOUND}\n" )
-FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_LINK_DIRECTORIES: ${WXWIDGETS_LINK_DIRECTORIES}\n" )
-FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_LIBRARIES: ${WXWIDGETS_LIBRARIES}\n" )
-FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_RELEASE_LIBRARIES: ${WXWIDGETS_RELEASE_LIBRARIES}\n" )
-FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_DEBUG_LIBRARIES: ${WXWIDGETS_DEBUG_LIBRARIES}\n" )
-FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_CXX_FLAGS: ${WXWIDGETS_CXX_FLAGS}\n" )
-FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_EXE_LINKER_FLAGS: ${WXWIDGETS_EXE_LINKER_FLAGS}\n" )
-FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_INCLUDE_DIR: ${WXWIDGETS_INCLUDE_DIR}\n" )
-FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_DEFINITIONS: ${WXWIDGETS_DEFINITIONS}\n" )
+++ /dev/null
-IF(NOT ALLOW_IN_SOURCE_BUILD)
- #---------------------------------------------------------------------------
- # Building in the source tree is forbidden !
- # (except if ALLOW_IN_SOURCE_BUILD is set, e.g. for packaging with rpmbuild)
- IF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR})
- MESSAGE(FATAL_ERROR "Building in the source tree is not allowed !! Quit; remove the file 'CMakeCache.txt' and the folder 'CMakeFiles' and build outside the sources")
- ENDIF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR})
- #---------------------------------------------------------------------------
-ENDIF(NOT ALLOW_IN_SOURCE_BUILD)
+++ /dev/null
-#=======================================================================
-# Looks for WxWidgets
-# sets BBTK_WXWIDGETS_FOUND to true if found
-#=======================================================================
-MACRO(BBTK_FIND_WXWIDGETS)
- IF(WIN32)
- # Search WXWIDGETS
-
- # WXWINDOWS_LIBRARY = full path to the wxWindows library and linker flags on unix
- # CMAKE_WX_CXX_FLAGS = compiler flags for building wxWindows
- # WXWINDOWS_INCLUDE_PATH = include path of wxWindows
- SET(WXWINDOWS_USE_GL 1)
-
- #wxWidgets build related stuff
- SET(WXW_USE_DEBUG ON)
- SET(WXW_USE_UNICODE OFF)
- SET(WXW_USE_SHARED ON)
- SET(WXW_USE_UNIV OFF)
- SET(WXW_USE_MONO OFF)
- SET(WXW_FILE_VERSION "28")
- SET(WXW_VERSION "2.8")
-
- #CMake Options
- # Why forcing verbosity ?
- # SET(CMAKE_VERBOSE_MAKEFILE TRUE)
-
- INCLUDE (${BBTK_CMAKE_DIR}/BBTKFindWxWidgetsWIN32.cmake)
- #
-
- ELSE(WIN32)
- # GTK2
- INCLUDE(${BBTK_CMAKE_DIR}/BBTKFindGTK2.cmake)
- # WX
- # LG : Do not force but use what is installed !
- # SET(wxWidgets_USE_LIBS base core gl)
- # Can I require all my user to have the gl lib on linux, even if they do not really need it...
- SET(WXGLCANVASLIBS "gl")
-
- FIND_PACKAGE( wxWidgets REQUIRED)
- #
- IF(wxWidgets_FOUND)
- MESSAGE(STATUS "Looking for wxWidgets... found ${wxWidgets_CONFIG_EXECUTABLE}")
- ENDIF(wxWidgets_FOUND)
- ENDIF(WIN32)
-
-
-
-ENDMACRO(BBTK_FIND_WXWIDGETS)
-#=======================================================================
-
-#=======================================================================
-MACRO(BBTK_USE_WXWIDGETS)
- # Preprocessor settings
- ADD_DEF( _USE_WXWIDGETS_ )
- #
- IF(WIN32)
- # Clean ?
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}${WXWIDGETS_CXX_FLAGS}")
- SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}${WXWIDGETS_EXE_LINKER_FLAGS}")
- #
- ADD_DEFINITIONS( ${WXWIDGETS_DEFINITIONS} )
- #
- INCLUDE_DIRECTORIES(${WXWIDGETS_INCLUDE_DIR})
- LINK_DIRECTORIES( ${WXWIDGETS_LINK_DIRECTORIES} )
- SET(BBTK_WXWIDGETS_LIBRARIES
- ${WXWIDGETS_LIBRARIES}
- ${WXWIDGETS_LIBRARIES} wxmsw28d_aui
- debug msvcrtd
- debug msvcprtd
- optimized msvcrt
- optimized msvcprt
- )
- ELSE(WIN32)
- # GTK2
- INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS})
- LINK_DIRECTORIES(${GTK2_LIBRARY_DIRS})
- LINK_LIBRARIES(${GTK2_LIBRARIES})
- # WX
- INCLUDE( ${wxWidgets_USE_FILE} )
- MARK_AS_ADVANCED(wxWidgets_CONFIG_EXECUTABLE)
- SET(BBTK_WXWIDGETS_LIBRARIES
- ${GTK2_LIBRARIES}
- ${wxWidgets_LIBRARIES}
- )
- ENDIF(WIN32)
-ENDMACRO(BBTK_USE_WXWIDGETS)
-#=======================================================================
+++ /dev/null
-#-----------------------------------------------------------------------------
-# Macro CREATE_FIND_PACKAGE
-# Creates and install the cmake files which allow
-# to find a library by the cmake command FIND_PACKAGE.
-#
-# Inputs :
-# --------
-# LIBRARY_NAME : name of the library to find
-#
-# The following variables **MUST** have been set previously :
-#
-# * ${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS
-# The list of include paths
-# when someone uses a *BUILD TREE* version of ${LIBRARY_NAME}.
-# NB :
-# THE PATHS *MUST BE RELATIVE* TO THE ROOT DIR OF THE PROJECT **SOURCES** !
-# Assume your project architecture is :
-# install/ : directory in which CREATE_FIND_PACKAGE is invoked
-# src/part1/include/ : first include dir
-# src/part2/include/ : second include dir
-# Then you should set the var with :
-# SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS
-# src/part1/include
-# src/part2/include )
-# Which will result in actual include paths :
-# ${PROJECT_SOURCE_DIR}/src/part1/include;
-# ${PROJECT_SOURCE_DIR}/src/part2/include
-# * ${LIBRARY_NAME}_BUILD_TREE_RELATIVE_LIBRARY_PATHS
-# Like the previous var but for the library paths.
-# NB :
-# THE PATHS *MUST BE RELATIVE* TO THE ROOT DIR OF THE **BUILD TREE**
-# THAT IS POINT TO THE FOLDERS WHERE THE LIBS WILL BE BUILD
-# Assume that your project architecture is :
-# src/part1/src/ : first source dir, in which the lib 'part1' is built
-# src/part2/src/ : first source dir, in which the lib 'part2' is built
-# Then you should set the var with
-# SET(${LIBRARY_NAME}_BUILD_TREE_RELATIVE_LIBRARY_PATHS
-# src/part1/src
-# src/part2/src
-# )
-# Which will result in actual library paths :
-# ${PROJECT_BINARY_DIR}/src/part1/src
-# ${PROJECT_BINARY_DIR}/src/part2/src
-# * ${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS
-# The list of include paths
-# when someone uses an *INSTALLED* version of ${LIBRARY_NAME}
-# The paths *MUST BE RELATIVE* to INSTALL_PREFIX
-# # A typical example is "include/${LIBRARY_NAME}"
-# * ${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS
-# Like the previous var but for library paths.
-# A typical example is ".."
-# * ${LIBRARY_NAME}_LIBRARIES
-# The list of libraries to link against when using ${LIBRARY_NAME}
-#
-# The following variables can be set optionally :
-#
-# * ${LIBRARY_NAME}_REQUIRED_C_FLAGS
-# * ${LIBRARY_NAME}_REQUIRED_CXX_FLAGS
-# * ${LIBRARY_NAME}_REQUIRED_LINK_FLAGS
-# * ${LIBRARY_NAME}_MAJOR_VERSION
-# * ${LIBRARY_NAME}_MINOR_VERSION
-# * ${LIBRARY_NAME}_BUILD_VERSION
-# * ${LIBRARY_NAME}_INSTALL_FOLDER : if set then install the stuff
-# in INSTALL_PREFIX/lib/${LIBRARY_NAME}_INSTALL_FOLDER
-# instead of INSTALL_PREFIX/lib/${LIBRARY_NAME}
-#
-#
-# To provide a user defined
-# couple of Config/Use file (in addition to the standard one) use :
-# SET( ${LIBRARY_NAME}_HAS_ADDITIONAL_CONFIG_FILE TRUE )
-# and store the *ABSOLUTE* paths to the additional files in the vars :
-# ${LIBRARY_NAME}_ADDITIONAL_CONFIG_FILE
-# ${LIBRARY_NAME}_ADDITIONAL_USE_FILE
-# (e.g. ${CMAKE_CURRENT_SOURCE_DIR}/MyConfig.cmake)
-#
-# Outputs :
-# --------
-# At cmake run-time, the macro creates the following files
-# in the current dir of the build tree (where the macro is invoked) :
-# Use${LIBRARY_NAME}.cmake
-# ${LIBRARY_NAME}Config.cmake
-# ${LIBRARY_NAME}BuildSettings.cmake
-# And if the vars ${LIBRARY_NAME}_ADDITIONAL_CONFIG_FILE and
-# ${LIBRARY_NAME}_ADDITIONAL_USE_FILE are set, it also creates :
-# Additional${LIBRARY_NAME}Config.cmake
-# AdditionalUse${LIBRARY_NAME}.cmake
-#
-# At install-time, the same files are installed
-# in INSTALL_PREFIX/lib/${LIBRARY_NAME}
-# and the file :
-# Find${LIBRARY_NAME}.cmake
-# is installed in ${CMAKE_ROOT}/Modules/
-#
-#
-#-----------------------------------------------------------------------------
-
-MACRO(CMAKE_CREATE_FIND_PACKAGE LIBRARY_NAME)
-
- #---------------------------------------------------------------------------
- # Sets the common values to build tree and install tree configs
- SET(CFP_LIB_REQUIRED_C_FLAGS ${${LIBRARY_NAME}_REQUIRED_C_FLAGS})
- SET(CFP_LIB_REQUIRED_CXX_FLAGS ${${LIBRARY_NAME}_REQUIRED_CXX_FLAGS})
- SET(CFP_LIB_REQUIRED_LINK_FLAGS ${${LIBRARY_NAME}_REQUIRED_LINK_FLAGS})
- SET(CFP_LIB_MAJOR_VERSION ${${LIBRARY_NAME}_MAJOR_VERSION})
- SET(CFP_LIB_MINOR_VERSION ${${LIBRARY_NAME}_MINOR_VERSION})
- SET(CFP_LIB_BUILD_VERSION ${${LIBRARY_NAME}_BUILD_VERSION})
- SET(CFP_LIB_VERSION
- ${CFP_LIB_MAJOR_VERSION}.${CFP_LIB_MINOR_VERSION}.${CFP_LIB_BUILD_VERSION})
- SET(CFP_LIB_LIBRARIES ${${LIBRARY_NAME}_LIBRARIES})
- IF (${LIBRARY_NAME}_HAS_ADDITIONAL_CONFIG_FILE)
- SET(CFP_LIB_HAS_ADDITIONAL_CONFIG_FILE TRUE)
- ELSE (${LIBRARY_NAME}_HAS_ADDITIONAL_CONFIG_FILE)
- SET(CFP_LIB_HAS_ADDITIONAL_CONFIG_FILE FALSE)
- ENDIF (${LIBRARY_NAME}_HAS_ADDITIONAL_CONFIG_FILE)
- #---------------------------------------------------------------------------
-
-
- #---------------------------------------------------------------------------
- #-- BUILD TREE configuration
- SET(CFP_BUILD_TREE_CONFIGURATION TRUE)
- # UseLIBRARY_NAME.cmake
- CONFIGURE_FILE(
- ${CMakeCreateFindPackage_DIR}/CMakeCreateFindPackage_UseLibrary.cmake.in
- ${PROJECT_BINARY_DIR}/Use${LIBRARY_NAME}.cmake
- @ONLY IMMEDIATE
- )
- # LIBRARY_NAMEConfig.cmake
- SET(CFP_LIB_RELATIVE_INCLUDE_PATHS
- ${${LIBRARY_NAME}_BUILD_TREE_RELATIVE_INCLUDE_PATHS})
- SET(CFP_LIB_RELATIVE_LIBRARY_PATHS
- ${${LIBRARY_NAME}_BUILD_TREE_RELATIVE_LIBRARY_PATHS})
- CONFIGURE_FILE(
- ${CMakeCreateFindPackage_DIR}/CMakeCreateFindPackage_LibraryConfig.cmake.in
- ${PROJECT_BINARY_DIR}/${LIBRARY_NAME}Config.cmake
- @ONLY IMMEDIATE
- )
- # LIBRARY_NAMEBuildSettings.cmake :
- # Save the compiler settings so another project can import them.
- INCLUDE(${CMAKE_ROOT}/Modules/CMakeExportBuildSettings.cmake)
- CMAKE_EXPORT_BUILD_SETTINGS(${PROJECT_BINARY_DIR}/${LIBRARY_NAME}BuildSettings.cmake)
- # Additional Config and Use files
- IF(CFP_LIB_HAS_ADDITIONAL_CONFIG_FILE)
- CONFIGURE_FILE(
- ${${LIBRARY_NAME}_ADDITIONAL_CONFIG_FILE}
- ${PROJECT_BINARY_DIR}/Additional${LIBRARY_NAME}Config.cmake
- @ONLY IMMEDIATE
- )
- CONFIGURE_FILE(
- ${${LIBRARY_NAME}_ADDITIONAL_USE_FILE}
- ${PROJECT_BINARY_DIR}/AdditionalUse${LIBRARY_NAME}.cmake
- @ONLY IMMEDIATE
- )
- ENDIF(CFP_LIB_HAS_ADDITIONAL_CONFIG_FILE)
- #---------------------------------------------------------------------------
-
-
- #---------------------------------------------------------------------------
- #-- INSTALL TREE configuration
- SET(CFP_BUILD_TREE_CONFIGURATION FALSE)
- # Create work directory to put the configured files because
- # if the user invoked the macro at the root of the build tree the files
- # would overwrite those configured for the build tree
- SET(CFP_WORK_DIR ${CMAKE_CURRENT_BINARY_DIR}/CMakeCreateFindPackage_stuff)
- IF(NOT IS_DIRECTORY ${CFP_WORK_DIR})
- FILE(MAKE_DIRECTORY ${CFP_WORK_DIR})
- ENDIF(NOT IS_DIRECTORY ${CFP_WORK_DIR})
-
- #----------------------------------------------------------------------------
- #INSTALLATION PATH
- IF(WIN32)
- SET(INSTALL_PATH .)
- ELSE(WIN32)
- IF(${LIBRARY_NAME}_INSTALL_FOLDER)
- SET(INSTALL_PATH lib/${${LIBRARY_NAME}_INSTALL_FOLDER})
- ELSE(${LIBRARY_NAME}_INSTALL_FOLDER)
- SET(INSTALL_PATH lib/${LIBRARY_NAME})
- ENDIF(${LIBRARY_NAME}_INSTALL_FOLDER)
- ENDIF(WIN32)
-
-
- # UseLIBRARY_NAME.cmake
- CONFIGURE_FILE(
- ${CMakeCreateFindPackage_DIR}/CMakeCreateFindPackage_UseLibrary.cmake.in
- ${CFP_WORK_DIR}/Use${LIBRARY_NAME}.cmake
- @ONLY IMMEDIATE
- )
- INSTALL(
- FILES
- ${CFP_WORK_DIR}/Use${LIBRARY_NAME}.cmake
- DESTINATION ${INSTALL_PATH}
- )
- # LIBRARY_NAMEConfig.cmake
- SET(CFP_LIB_RELATIVE_INCLUDE_PATHS
- ${${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS})
- SET(CFP_LIB_RELATIVE_LIBRARY_PATHS
- ${${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS})
- CONFIGURE_FILE(
- ${CMakeCreateFindPackage_DIR}/CMakeCreateFindPackage_LibraryConfig.cmake.in
- ${CFP_WORK_DIR}/${LIBRARY_NAME}Config.cmake
- @ONLY IMMEDIATE
- )
- INSTALL(
- FILES
- ${CFP_WORK_DIR}/${LIBRARY_NAME}Config.cmake
- DESTINATION ${INSTALL_PATH}
- )
- # LIBRARY_NAMEBuildSettings.cmake :
- CMAKE_EXPORT_BUILD_SETTINGS(${CFP_WORK_DIR}/${LIBRARY_NAME}BuildSettings.cmake)
- INSTALL(
- FILES
- ${CFP_WORK_DIR}/${LIBRARY_NAME}BuildSettings.cmake
- DESTINATION ${INSTALL_PATH}
- )
- # Additional Config and Use files
- IF(CFP_LIB_HAS_ADDITIONAL_CONFIG_FILE)
- CONFIGURE_FILE(
- ${${LIBRARY_NAME}_ADDITIONAL_CONFIG_FILE}
- ${CFP_WORK_DIR}/Additional${LIBRARY_NAME}Config.cmake
- @ONLY IMMEDIATE
- )
- INSTALL(
- FILES
- ${CFP_WORK_DIR}/Additional${LIBRARY_NAME}Config.cmake
- DESTINATION ${INSTALL_PATH}
- )
- CONFIGURE_FILE(
- ${${LIBRARY_NAME}_ADDITIONAL_USE_FILE}
- ${CFP_WORK_DIR}/AdditionalUse${LIBRARY_NAME}.cmake
- @ONLY IMMEDIATE
- )
- INSTALL(
- FILES
- ${CFP_WORK_DIR}/AdditionalUse${LIBRARY_NAME}.cmake
- DESTINATION ${INSTALL_PATH}
- )
- ENDIF(CFP_LIB_HAS_ADDITIONAL_CONFIG_FILE)
- # Specific to install tree
- # FindLIBRARY_NAME.cmake in CMake/Modules dir
- CONFIGURE_FILE(
- ${CMakeCreateFindPackage_DIR}/CMakeCreateFindPackage_FindLibrary.cmake.in
- ${CFP_WORK_DIR}/Find${LIBRARY_NAME}.cmake
- @ONLY IMMEDIATE
- )
- INSTALL(
- FILES ${CFP_WORK_DIR}/Find${LIBRARY_NAME}.cmake
- DESTINATION ${CMAKE_ROOT}/Modules
- )
- #---------------------------------------------------------------------------
-
-
-
-
-ENDMACRO(CMAKE_CREATE_FIND_PACKAGE)
-#-----------------------------------------------------------------------------
+++ /dev/null
-# - Find a library installation or build tree.
-#
-# The following variables are set if @LIBRARY_NAME@ is found.
-# If @LIBRARY_NAME@ is not found, @LIBRARY_NAME@_FOUND is set to false.
-# @LIBRARY_NAME@_FOUND - Set to true when @LIBRARY_NAME@ is found.
-# @LIBRARY_NAME@_USE_FILE - CMake file to use @LIBRARY_NAME@.
-# @LIBRARY_NAME@_MAJOR_VERSION - The @LIBRARY_NAME@ major version number.
-# @LIBRARY_NAME@_MINOR_VERSION - The @LIBRARY_NAME@ minor version number
-# (odd non-release).
-# @LIBRARY_NAME@_BUILD_VERSION - The @LIBRARY_NAME@ patch level
-# (meaningless for odd minor).
-# @LIBRARY_NAME@_INCLUDE_DIRS - Include directories for @LIBRARY_NAME@
-# @LIBRARY_NAME@_LIBRARY_DIRS - Link directories for @LIBRARY_NAME@ libraries
-# @LIBRARY_NAME@_LIBRARIES - List of libraries to link against
-#
-# The following cache entries must be set by the user to locate @LIBRARY_NAME@:
-# @LIBRARY_NAME@_DIR - The directory containing @LIBRARY_NAME@Config.cmake.
-# This is either the root of the build tree,
-# or the lib/@LIBRARY_NAME@ directory. This is the
-# only cache entry.
-
-
-# Construct consitent error messages for use below.
-SET(@LIBRARY_NAME@_DIR_DESCRIPTION "directory containing @LIBRARY_NAME@Config.cmake. This is either the root of the build tree, or PREFIX/lib/@LIBRARY_NAME@ for an installation.")
-SET(@LIBRARY_NAME@_NOT_FOUND_MESSAGE "@LIBRARY_NAME@ not found. Set the @LIBRARY_NAME@_DIR cmake cache entry to the ${@LIBRARY_NAME@_DIR_DESCRIPTION}")
-
-# Search only if the location is not already known.
-IF(NOT @LIBRARY_NAME@_DIR)
- # Get the system search path as a list.
- IF(UNIX)
- STRING(REGEX MATCHALL "[^:]+" @LIBRARY_NAME@_DIR_SEARCH1 "$ENV{PATH}")
- ELSE(UNIX)
- STRING(REGEX REPLACE "\\\\" "/" @LIBRARY_NAME@_DIR_SEARCH1 "$ENV{PATH}")
- ENDIF(UNIX)
- STRING(REGEX REPLACE "/;" ";" @LIBRARY_NAME@_DIR_SEARCH2 "${@LIBRARY_NAME@_DIR_SEARCH1}")
-
- # Construct a set of paths relative to the system search path.
- SET(@LIBRARY_NAME@_DIR_SEARCH "")
- FOREACH(dir ${@LIBRARY_NAME@_DIR_SEARCH2})
- SET(@LIBRARY_NAME@_DIR_SEARCH ${@LIBRARY_NAME@_DIR_SEARCH}
- ${dir}/../lib/@INSTALL_PATH@
- )
- ENDFOREACH(dir)
-
- #
- # Look for an installation or build tree.
- #
- FIND_PATH(@LIBRARY_NAME@_DIR Use@LIBRARY_NAME@.cmake
- # Look for an environment variable @LIBRARY_NAME@_DIR.
- $ENV{@LIBRARY_NAME@_DIR}
-
- # Look in places relative to the system executable search path.
- ${@LIBRARY_NAME@_DIR_SEARCH}
-
- # Look in standard WIN install locations.
- "$ENV{ProgramFiles}/@LIBRARY_NAME@"
-
- # Look in standard UNIX install locations.
- /usr/local/@INSTALL_PATH@
- /usr/@INSTALL_PATH@
-
- # Read from the CMakeSetup registry entries. It is likely that
- # @LIBRARY_NAME@ will have been recently built.
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10]
-
- # Help the user find it if we cannot.
- DOC "The ${@LIBRARY_NAME@_DIR_DESCRIPTION}"
- )
-ENDIF(NOT @LIBRARY_NAME@_DIR)
-
-# If @LIBRARY_NAME@ was found, load the configuration file to get the rest of the
-# settings.
-IF(@LIBRARY_NAME@_DIR)
- # Make sure the @LIBRARY_NAME@Config.cmake file exists in the directory provided.
- IF(EXISTS ${@LIBRARY_NAME@_DIR}/@LIBRARY_NAME@Config.cmake)
-
- # We found @LIBRARY_NAME@. Load the settings.
- SET(@LIBRARY_NAME@_FOUND 1)
- INCLUDE(${@LIBRARY_NAME@_DIR}/@LIBRARY_NAME@Config.cmake)
-
- ENDIF(EXISTS ${@LIBRARY_NAME@_DIR}/@LIBRARY_NAME@Config.cmake)
-ELSE(@LIBRARY_NAME@_DIR)
- # We did not find @LIBRARY_NAME@.
- SET(@LIBRARY_NAME@_FOUND 0)
-ENDIF(@LIBRARY_NAME@_DIR)
-
-#-----------------------------------------------------------------------------
-IF(NOT @LIBRARY_NAME@_FOUND)
- # @LIBRARY_NAME@ not found, explain to the user how to specify its location.
- IF(NOT @LIBRARY_NAME@_FIND_QUIETLY)
- MESSAGE(FATAL_ERROR ${@LIBRARY_NAME@_NOT_FOUND_MESSAGE})
- ELSE(NOT @LIBRARY_NAME@_FIND_QUIETLY)
- IF(@LIBRARY_NAME@_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR ${@LIBRARY_NAME@_NOT_FOUND_MESSAGE})
- ENDIF(@LIBRARY_NAME@_FIND_REQUIRED)
- ENDIF(NOT @LIBRARY_NAME@_FIND_QUIETLY)
-ENDIF(NOT @LIBRARY_NAME@_FOUND)
+++ /dev/null
-#-----------------------------------------------------------------------------
-#
-# @LIBRARY_NAME@Config.cmake - CMake configuration file for external projects.
-# Created by the cmake macro CREATE_FIND_PACKAGE of the CreateFindPackage suite
-#
-# This file is configured by cmake and used by the
-# Use@LIBRARY_NAME@.cmake module to load the lib settings
-# for an external project.
-
-# Build tree config ?
-SET(CFP_BUILD_TREE_CONFIGURATION @CFP_BUILD_TREE_CONFIGURATION@)
-
-
-IF(UNIX)
-SET(GOTO_INSTALL_PREFIX /../..)
-ENDIF(UNIX)
-
-
-# The @LIBRARY_NAME@ include file *RELATIVE* directories.
-SET(CFP_RELATIVE_INCLUDE_PATHS "@CFP_LIB_RELATIVE_INCLUDE_PATHS@")
-# Compute the prefix for include and library paths
-IF(CFP_BUILD_TREE_CONFIGURATION)
- # In build tree
- # the include paths are relative to the source tree *AND* the binary tree
- # for generated files
- SET(CFP_INCLUDE_PATH_PREFIX @PROJECT_SOURCE_DIR@)
- # Build the *ABSOLUTE* directories
- FOREACH(path ${CFP_RELATIVE_INCLUDE_PATHS})
- SET(@LIBRARY_NAME@_INCLUDE_DIRS
- ${@LIBRARY_NAME@_INCLUDE_DIRS}
- ${CFP_INCLUDE_PATH_PREFIX}/${path}
- )
- ENDFOREACH(path ${CFP_RELATIVE_INCLUDE_PATHS})
- SET(CFP_INCLUDE_PATH_PREFIX @PROJECT_BINARY_DIR@)
- # Build the *ABSOLUTE* directories
- FOREACH(path ${CFP_RELATIVE_INCLUDE_PATHS})
- SET(@LIBRARY_NAME@_INCLUDE_DIRS
- ${@LIBRARY_NAME@_INCLUDE_DIRS}
- ${CFP_INCLUDE_PATH_PREFIX}/${path}
- )
- ENDFOREACH(path ${CFP_RELATIVE_INCLUDE_PATHS})
-ELSE(CFP_BUILD_TREE_CONFIGURATION)
- # In install tree
- # the include paths are relative to install prefix
- # On unix , GOTO_INSTALL_PREFIX allows to get back to the
- # installation prefix from @LIBRARY_NAME@_DIR
- SET(CFP_INCLUDE_PATH_PREFIX ${@LIBRARY_NAME@_DIR}${GOTO_INSTALL_PREFIX})
- # Build the *ABSOLUTE* directories
- FOREACH(path ${CFP_RELATIVE_INCLUDE_PATHS})
- SET(@LIBRARY_NAME@_INCLUDE_DIRS
- ${@LIBRARY_NAME@_INCLUDE_DIRS}
- ${CFP_INCLUDE_PATH_PREFIX}/${path}
- )
- ENDFOREACH(path ${CFP_RELATIVE_INCLUDE_PATHS})
-ENDIF(CFP_BUILD_TREE_CONFIGURATION)
-
-
-
-# Compute the prefix for library paths
-IF(CFP_BUILD_TREE_CONFIGURATION)
- # In build tree
- # the library paths are relative to the binary tree
- SET(CFP_LIBRARY_PATH_PREFIX @PROJECT_BINARY_DIR@)
-ELSE(CFP_BUILD_TREE_CONFIGURATION)
- # In install tree
- # the library paths are relative to install prefix
- SET(CFP_LIBRARY_PATH_PREFIX ${@LIBRARY_NAME@_DIR}${GOTO_INSTALL_PREFIX})
-ENDIF(CFP_BUILD_TREE_CONFIGURATION)
-# The @LIBRARY_NAME@ library file *RELATIVE* directories.
-SET(CFP_RELATIVE_LIBRARY_PATHS "@CFP_LIB_RELATIVE_LIBRARY_PATHS@")
-# Build the *ABSOLUTE* directories
-FOREACH(path ${CFP_RELATIVE_LIBRARY_PATHS})
- SET(@LIBRARY_NAME@_LIBRARY_DIRS
- ${@LIBRARY_NAME@_LIBRARY_DIRS}
- ${CFP_LIBRARY_PATH_PREFIX}/${path}
- )
-ENDFOREACH(path ${CFP_RELATIVE_LIBRARY_PATHS})
-
-# Set the "prefix path"
-SET(@LIBRARY_NAME@_INSTALL_PREFIX ${CFP_LIBRARY_PATH_PREFIX})
-
-# The C and C++ flags added by @LIBRARY_NAME@ to the cmake-configured flags.
-SET(@LIBRARY_NAME@_REQUIRED_C_FLAGS "@CFP_LIB_REQUIRED_C_FLAGS@")
-SET(@LIBRARY_NAME@_REQUIRED_CXX_FLAGS "@CFP_LIB_REQUIRED_CXX_FLAGS@")
-SET(@LIBRARY_NAME@_REQUIRED_LINK_FLAGS "@CFP_LIB_REQUIRED_LINK_FLAGS@")
-
-# The @LIBRARY_NAME@ version
-SET(@LIBRARY_NAME@_MAJOR_VERSION @CFP_LIB_MAJOR_VERSION@)
-SET(@LIBRARY_NAME@_MINOR_VERSION @CFP_LIB_MINOR_VERSION@)
-SET(@LIBRARY_NAME@_BUILD_VERSION @CFP_LIB_BUILD_VERSION@)
-SET(@LIBRARY_NAME@_VERSION @CFP_LIB_VERSION@)
-
-# The location of the Use@LIBRARY_NAME@.cmake file.
-SET(@LIBRARY_NAME@_USE_FILE "${@LIBRARY_NAME@_DIR}/Use@LIBRARY_NAME@.cmake")
-
-# The build settings file.
-SET(@LIBRARY_NAME@_BUILD_SETTINGS_FILE
- "${@LIBRARY_NAME@_DIR}/@LIBRARY_NAME@BuildSettings.cmake")
-
-# A list of all libraries for @LIBRARY_NAME@. Those listed here should
-# automatically pull in their dependencies.
-SET(@LIBRARY_NAME@_LIBRARIES @CFP_LIB_LIBRARIES@)
-
-# Messages
-IF(FIND_PACKAGE_VERBOSE)
- MESSAGE(STATUS "Looking for @LIBRARY_NAME@... found - configuration :")
- MESSAGE(STATUS "* @LIBRARY_NAME@_DIR = ${@LIBRARY_NAME@_DIR}")
- MESSAGE(STATUS "* @LIBRARY_NAME@_VERSION = ${@LIBRARY_NAME@_VERSION}")
- MESSAGE(STATUS "* @LIBRARY_NAME@_USE_FILE = ${@LIBRARY_NAME@_USE_FILE}")
-
- MESSAGE(STATUS "* @LIBRARY_NAME@_INCLUDE_DIRS = ${@LIBRARY_NAME@_INCLUDE_DIRS}")
- MESSAGE(STATUS "* @LIBRARY_NAME@_LIBRARY_DIRS = ${@LIBRARY_NAME@_LIBRARY_DIRS}")
- MESSAGE(STATUS "* @LIBRARY_NAME@_LIBRARIES = ${@LIBRARY_NAME@_LIBRARIES}")
-ENDIF(FIND_PACKAGE_VERBOSE)
-
-# Does the library has an additional config file (user provided) ?
-SET(@LIBRARY_NAME@_HAS_ADDITIONAL_CONFIG_FILE @CFP_LIB_HAS_ADDITIONAL_CONFIG_FILE@)
-
-IF (@LIBRARY_NAME@_HAS_ADDITIONAL_CONFIG_FILE)
- IF(FIND_PACKAGE_VERBOSE)
- MESSAGE(STATUS "Reading @LIBRARY_NAME@ additional configuration file")
- ENDIF(FIND_PACKAGE_VERBOSE)
- # Include it
- INCLUDE(${@LIBRARY_NAME@_DIR}/Additional@LIBRARY_NAME@Config.cmake)
-ENDIF (@LIBRARY_NAME@_HAS_ADDITIONAL_CONFIG_FILE)
+++ /dev/null
-# This is an implementation detail for using @LIBRARY_NAME@ with the
-# Find@LIBRARY_NAME@.cmake module. Do not include directly by name.
-# This should be included only when Find@LIBRARY_NAME@.cmake sets
-# the @LIBRARY_NAME@_USE_FILE variable to point here.
-
-IF(FIND_PACKAGE_VERBOSE)
- MESSAGE(STATUS "Using @LIBRARY_NAME@")
-ENDIF(FIND_PACKAGE_VERBOSE)
-
-# Load the compiler settings used for @LIBRARY_NAME@.
-IF(@LIBRARY_NAME@_BUILD_SETTINGS_FILE)
- INCLUDE(CMakeImportBuildSettings)
- CMAKE_IMPORT_BUILD_SETTINGS(${@LIBRARY_NAME@_BUILD_SETTINGS_FILE})
-ENDIF(@LIBRARY_NAME@_BUILD_SETTINGS_FILE)
-
-# Add compiler flags needed to use @LIBRARY_NAME@.
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${@LIBRARY_NAME@_REQUIRED_C_FLAGS}")
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${@LIBRARY_NAME@_REQUIRED_CXX_FLAGS}")
-SET(CMAKE_LINK_FLAGS "${CMAKE_LINK_FLAGS} ${@LIBRARY_NAME@_REQUIRED_LINK_FLAGS}")
-
-# Add include directories needed to use @LIBRARY_NAME@.
-INCLUDE_DIRECTORIES(${@LIBRARY_NAME@_INCLUDE_DIRS})
-
-# Add link directories needed to use @LIBRARY_NAME@.
-LINK_DIRECTORIES(${@LIBRARY_NAME@_LIBRARY_DIRS})
-
-# Set the version
-# Already done in bbtkConfigure.h
-#ADD_DEFINITIONS( -D@LIBRARY_NAME@_VERSION="\"${@LIBRARY_NAME@_VERSION}\"" )
-
-# Additional use file
-IF (@LIBRARY_NAME@_HAS_ADDITIONAL_CONFIG_FILE)
- # Include it
- INCLUDE(${@LIBRARY_NAME@_DIR}/AdditionalUse@LIBRARY_NAME@.cmake)
-ENDIF (@LIBRARY_NAME@_HAS_ADDITIONAL_CONFIG_FILE)
+++ /dev/null
-
-
-MACRO(FIND_AND_USE_WXWIDGETS)
-
- IF(WIN32)
- # Search WXWIDGETS
-
- # WXWINDOWS_LIBRARY = full path to the wxWindows library and linker flags on unix
- # CMAKE_WX_CXX_FLAGS = compiler flags for building wxWindows
- # WXWINDOWS_INCLUDE_PATH = include path of wxWindows
- # WXWIDGETS_LIBRARIES = wx libraries
-
- SET(WXWINDOWS_USE_GL 1)
-
- #wxWidgets build related stuff
- SET(WXW_USE_DEBUG ON)
- SET(WXW_USE_UNICODE OFF)
- SET(WXW_USE_SHARED ON)
- SET(WXW_USE_UNIV OFF)
- SET(WXW_USE_MONO OFF)
- SET(WXW_FILE_VERSION "28")
- SET(WXW_VERSION "2.8")
-
- #CMake Options
- SET(CMAKE_VERBOSE_MAKEFILE TRUE)
-
- INCLUDE (cmake/FindwxW.cmake)
- #
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}${WXWIDGETS_CXX_FLAGS}")
- SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}${WXWIDGETS_EXE_LINKER_FLAGS}")
- ADD_DEFINITIONS( ${WXWIDGETS_DEFINITIONS} )
- #
- INCLUDE_DIRECTORIES(${WXWIDGETS_INCLUDE_DIR})
- LINK_DIRECTORIES( ${WXWIDGETS_LINK_DIRECTORIES} )
- SET(WXWIDGETS_LIBRARIES
- ${WXWIDGETS_LIBRARIES}
- debug msvcrtd
- debug msvcprtd
- optimized msvcrt
- optimized msvcprt
- )
- ENDIF(WIN32)
- IF(UNIX)
- # GTK2
- INCLUDE(cmake/FindGTK2.cmake)
- INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS})
- LINK_DIRECTORIES(${GTK2_LIBRARY_DIRS})
- LINK_LIBRARIES(${GTK2_LIBRARIES})
- # WX
- #SET(wxWidgets_USE_LIBS base core gl)
- FIND_PACKAGE( wxWidgets REQUIRED)
- INCLUDE( ${wxWidgets_USE_FILE} )
- MARK_AS_ADVANCED(wxWidgets_CONFIG_EXECUTABLE)
- SET(WXWIDGETS_LIBRARIES
- ${wxWidgets_LIBRARIES}
- ${GTK2_LIBRARIES}
- )
- MARK_AS_ADVANCED(GTK2_CAIRO_INCLUDE_PATH)
- MARK_AS_ADVANCED(GTK2_GOBJECT_LIBRARY)
- ENDIF(UNIX)
-
-ENDMACRO(FIND_AND_USE_WXWIDGETS)
-
+++ /dev/null
-Package:
- CMakeList.txt
- Configure.cmake
- ..BBTKConfigurePackage.cmake
- ..BBTKMacros.cmake
- ..BBTKFindLibraries.cmake
- src/CMakeList.txt
- doc/CMakeList.txt
- bbs/CMakeList.txt
- data/CMakeList.txt
-
\ No newline at end of file
#-----------------------------------------------------------------------------
# Code installing the files needed to find the lib by FIND_PACKAGE
-# Uses CMakeCreateFindPackage
+# Uses CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
-# Includes CMakeCreateFindPackage
-INCLUDE(${CMakeCreateFindPackage_DIR}/CMakeCreateFindPackage.cmake)
-CMAKE_CREATE_FIND_PACKAGE(${LIBRARY_NAME})
+CREA_ADVANCED_INSTALL_LIBRARY_FOR_CMAKE(${LIBRARY_NAME})
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------