Commit 6836ce11 authored by Valentin Blot's avatar Valentin Blot
Browse files

removed cmake build system

parent 610efb0d
# The name of our project is "AQA_Transform".
# David Coeurjolly <david.coeurjolly@liris.cnrs.fr> 08/2006
PROJECT(AQA_Transform)
SET(PROJECT_VERSION 0.2)
cmake_minimum_required(VERSION 2.4)
SET(CPACK_PACKAGE_VERSION 0.2)
SET(CPACK_PACKAGE_VERSION_MAJOR 0)
SET(CPACK_PACKAGE_VERSION_MINOR 2)
INCLUDE(CPack)
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/")
add_subdirectory(src)
SET(optionalLibs ${optionalLibs} m)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
##Generation of the documentation using doxygen
#
# new "make doc" target
#
INCLUDE("${CMAKE_MODULE_PATH}/TargetDoxygenDoc.cmake" OPTIONAL)
#-*-cmake-*-
#
# Test for LibVol libraries
#
# Once loaded this will define
# LONGVOL_FOUND - system has libvol
# LONGVOL_INCLUDE_DIR - include directory
# LONGVOL_LIBRARY_DIR - library directory
# LONGVOL_LIBRARIES - libraries you need to link to
#
SET(LONGVOL_FOUND "NO" )
FIND_PATH( LONGVOL_INCLUDE_DIR longvol.h
"$ENV{LONGVOL_LOCATION}"
"$ENV{LONGVOL_LOCATION}/include"
"$ENV{LONGVOL_HOME}/include"
/usr/include/
/usr/local/include/
)
FIND_LIBRARY(Longvol longvol
PATHS
"$ENV{LONGVOL_LOCATION}/"
"$ENV{LONGVOL_LOCATION}/lib"
"$ENV{LONGVOL_HOME}/lib"
DOC "libvol library"
)
SET(LONGVOL_LIBRARIES ${Longvol} )
IF (LONGVOL_INCLUDE_DIR)
IF(LONGVOL_LIBRARIES)
SET(LONGVOL_FOUND "YES")
GET_FILENAME_COMPONENT(LONGVOL_LIBRARY_DIR ${Longvol} PATH)
ENDIF(LONGVOL_LIBRARIES)
ENDIF(LONGVOL_INCLUDE_DIR)
IF(NOT LONGVOL_FOUND)
# make FIND_PACKAGE friendly
IF(NOT Vol_FIND_QUIETLY)
IF(Vol_FIND_REQUIRED)
MESSAGE(FATAL_ERROR
"libvol required, please specify it's location with LONGVOL_HOME, LONGVOL_LOCATION")
ELSE(Vol_FIND_REQUIRED)
MESSAGE(STATUS "liblongvol was not found.")
ENDIF(Vol_FIND_REQUIRED)
ENDIF(NOT Vol_FIND_QUIETLY)
ENDIF(NOT LONGVOL_FOUND)
#####
#-*-cmake-*-
#
# Test for ImageMagick libraries, unlike CMake's FindImageMagick.cmake which
# tests for ImageMagick's binary utilities
#
# Once loaded this will define
# MAGICK_FOUND - system has ImageMagick
# MAGICK_INCLUDE_DIR - include directory for ImageMagick
# MAGICK_LIBRARY_DIR - library directory for ImageMagick
# MAGICK_LIBRARIES - libraries you need to link to
#
# MAGICK++_FOUND - system has ImageMagick
# MAGICK++_INCLUDE_DIR - include directory for ImageMagick
# MAGICK++_LIBRARY_DIR - library directory for ImageMagick
# MAGICK++_LIBRARIES - libraries you need to link to
#
SET(MAGICK_FOUND "NO" )
SET(MAGICK++_FOUND "NO" )
FIND_PATH( MAGICK_INCLUDE_DIR magick.h
"$ENV{MAGICK_LOCATION}/magick"
"$ENV{MAGICK_LOCATION}/include/magick"
"$ENV{MAGICK_HOME}/include/magick"
/usr/include/magick
/usr/include/
)
FIND_PATH( MAGICK++_INCLUDE_DIR Magick++.h
"$ENV{MAGICK++_LOCATION}/Magick++"
"$ENV{MAGICK++_LOCATION}/include/"
"$ENV{MAGICK_LOCATION}/Magick++"
"$ENV{MAGICK_LOCATION}/include/Magick++"
"$ENV{MAGICK_LOCATION}/include/"
"$ENV{MAGICK_HOME}/include/"
/usr/include/Magick++
/usr/include/
)
FIND_LIBRARY( Magick Magick
PATHS
"$ENV{MAGICK_LOCATION}/magick/.libs"
"$ENV{MAGICK_LOCATION}/lib"
"$ENV{MAGICK_HOME}/lib"
DOC "ImageMagick magic library"
)
FIND_LIBRARY( Magick++ Magick++
PATHS
"$ENV{MAGICK++_LOCATION}/.libs"
"$ENV{MAGICK_LOCATION}/.libs"
"$ENV{MAGICK++_LOCATION}/lib"
"$ENV{MAGICK_LOCATION}/lib"
"$ENV{MAGICK_HOME}/lib"
DOC "ImageMagick Magick++ library"
)
SET(MAGICK_LIBRARIES ${Magick} )
SET(MAGICK++_LIBRARIES ${Magick++} )
IF (MAGICK_INCLUDE_DIR)
IF(MAGICK_LIBRARIES)
SET(MAGICK_FOUND "YES")
GET_FILENAME_COMPONENT(MAGICK_LIBRARY_DIR ${Magick} PATH)
ENDIF(MAGICK_LIBRARIES)
ENDIF(MAGICK_INCLUDE_DIR)
IF (MAGICK++_INCLUDE_DIR)
IF(MAGICK++_LIBRARIES)
SET(MAGICK++_FOUND "YES")
GET_FILENAME_COMPONENT(MAGICK++_LIBRARY_DIR ${Magick++} PATH)
ENDIF(MAGICK++_LIBRARIES)
ENDIF(MAGICK++_INCLUDE_DIR)
IF(NOT MAGICK_FOUND)
# make FIND_PACKAGE friendly
IF(NOT Magick_FIND_QUIETLY)
IF(Magick_FIND_REQUIRED)
MESSAGE(FATAL_ERROR
"ImageMagick required, please specify it's location with MAGICK_HOME, MAGICK_LOCATION or MAGICK++_LOCATION")
ELSE(Magick_FIND_REQUIRED)
MESSAGE(STATUS "ImageMagick was not found.")
ENDIF(Magick_FIND_REQUIRED)
ENDIF(NOT Magick_FIND_QUIETLY)
ENDIF(NOT MAGICK_FOUND)
#####
#-*-cmake-*-
#
# Test for LibVol libraries
#
# Once loaded this will define
# VOL_FOUND - system has libvol
# VOL_INCLUDE_DIR - include directory
# VOL_LIBRARY_DIR - library directory
# VOL_LIBRARIES - libraries you need to link to
#
SET(VOL_FOUND "NO" )
FIND_PATH( VOL_INCLUDE_DIR vol.h
"$ENV{VOL_LOCATION}"
"$ENV{VOL_LOCATION}/include"
"$ENV{VOL_HOME}/include"
/usr/include/
/usr/local/include/
)
FIND_LIBRARY(Vol vol
PATHS
"$ENV{VOL_LOCATION}/"
"$ENV{VOL_LOCATION}/lib"
"$ENV{VOL_HOME}/lib"
DOC "libvol library"
)
SET(VOL_LIBRARIES ${Vol} )
IF (VOL_INCLUDE_DIR)
IF(VOL_LIBRARIES)
SET(VOL_FOUND "YES")
GET_FILENAME_COMPONENT(VOL_LIBRARY_DIR ${Vol} PATH)
ENDIF(VOL_LIBRARIES)
ENDIF(VOL_INCLUDE_DIR)
IF(NOT VOL_FOUND)
# make FIND_PACKAGE friendly
IF(NOT Vol_FIND_QUIETLY)
IF(Vol_FIND_REQUIRED)
MESSAGE(FATAL_ERROR
"libvol required, please specify it's location with VOL_HOME, VOL_LOCATION")
ELSE(Vol_FIND_REQUIRED)
MESSAGE(STATUS "libvol was not found.")
ENDIF(Vol_FIND_REQUIRED)
ENDIF(NOT Vol_FIND_QUIETLY)
ENDIF(NOT VOL_FOUND)
#####
FIND_PACKAGE(Doxygen)
IF (DOXYGEN_FOUND)
# click+jump in Emacs and Visual Studio (for doxy.config) (jw)
IF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
SET(DOXY_WARN_FORMAT "\"$file($line) : $text \"")
ELSE (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
SET(DOXY_WARN_FORMAT "\"$file:$line: $text \"")
ENDIF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
# we need latex for doxygen because of the formulas
FIND_PACKAGE(LATEX)
IF (NOT LATEX_COMPILER)
MESSAGE(STATUS "latex command LATEX_COMPILER not found but usually required. You will probably get warnings and user inetraction on doxy run.")
ENDIF (NOT LATEX_COMPILER)
IF (NOT MAKEINDEX_COMPILER)
MESSAGE(STATUS "makeindex command MAKEINDEX_COMPILER not found but usually required.")
ENDIF (NOT MAKEINDEX_COMPILER)
IF (NOT DVIPS_CONVERTER)
MESSAGE(STATUS "dvips command DVIPS_CONVERTER not found but usually required.")
ENDIF (NOT DVIPS_CONVERTER)
IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in")
MESSAGE(STATUS "configured ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in --> ${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in
${CMAKE_CURRENT_BINARY_DIR}/doxy.config
@ONLY )
# use (configured) doxy.config from (out of place) BUILD tree:
SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in")
# use static hand-edited doxy.config from SOURCE tree:
SET(DOXY_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
MESSAGE(STATUS "WARNING: using existing ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config instead of configuring from doxy.config.in file.")
ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
IF (EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
# using template doxy.config.in
MESSAGE(STATUS "configured ${CMAKE_CMAKE_MODULE_PATH}/doxy.config.in --> ${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
CONFIGURE_FILE(${CMAKE_MODULE_PATH}/doxy.config.in
${CMAKE_CURRENT_BINARY_DIR}/doxy.config
@ONLY )
SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
ELSE (EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
# failed completely...
MESSAGE(SEND_ERROR "Please create ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in (or doxy.config as fallback)")
ENDIF(EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in")
ADD_CUSTOM_TARGET(doc ${DOXYGEN_EXECUTABLE} ${DOXY_CONFIG})
# create a windows help .chm file using hhc.exe
# HTMLHelp DLL must be in path!
# fallback: use hhw.exe interactively
IF (WIN32)
FIND_PACKAGE(HTMLHelp)
IF (HTML_HELP_COMPILER)
SET (TMP "${CMAKE_CURRENT_BINARY_DIR}\\Doc\\html\\index.hhp")
STRING(REGEX REPLACE "[/]" "\\\\" HHP_FILE ${TMP} )
# MESSAGE(SEND_ERROR "DBG HHP_FILE=${HHP_FILE}")
ADD_CUSTOM_TARGET(winhelp ${HTML_HELP_COMPILER} ${HHP_FILE})
ADD_DEPENDENCIES (winhelp doc)
IF (NOT TARGET_DOC_SKIP_INSTALL)
# install windows help?
# determine useful name for output file
# should be project and version unique to allow installing
# multiple projects into one global directory
IF (EXISTS "${PROJECT_BINARY_DIR}/Doc/html/index.chm")
IF (PROJECT_NAME)
SET(OUT "${PROJECT_NAME}")
ELSE (PROJECT_NAME)
SET(OUT "Documentation") # default
ENDIF(PROJECT_NAME)
IF (${PROJECT_NAME}_VERSION_MAJOR)
SET(OUT "${OUT}-${${PROJECT_NAME}_VERSION_MAJOR}")
IF (${PROJECT_NAME}_VERSION_MINOR)
SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_MINOR}")
IF (${PROJECT_NAME}_VERSION_PATCH)
SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_PATCH}")
ENDIF(${PROJECT_NAME}_VERSION_PATCH)
ENDIF(${PROJECT_NAME}_VERSION_MINOR)
ENDIF(${PROJECT_NAME}_VERSION_MAJOR)
# keep suffix
SET(OUT "${OUT}.chm")
#MESSAGE("DBG ${PROJECT_BINARY_DIR}/Doc/html/index.chm \n${OUT}")
# create target used by install and package commands
INSTALL(FILES "${PROJECT_BINARY_DIR}/Doc/html/index.chm"
DESTINATION "doc"
RENAME "${OUT}"
)
ENDIF(EXISTS "${PROJECT_BINARY_DIR}/Doc/html/index.chm")
ENDIF(NOT TARGET_DOC_SKIP_INSTALL)
ENDIF(HTML_HELP_COMPILER)
# MESSAGE(SEND_ERROR "HTML_HELP_COMPILER=${HTML_HELP_COMPILER}")
ENDIF (WIN32)
ENDIF(DOXYGEN_FOUND)
This diff is collapsed.
##########Check if libMagick++ exists
FIND_PACKAGE(Magick REQUIRED)
##tclap
INCLUDE_DIRECTORIES(${AQA_Transform_SOURCE_DIR}/src/tclap)
IF(MAGICK++_FOUND)
INCLUDE_DIRECTORIES(${MAGICK++_INCLUDE_DIR})
SET(optionalLibs ${optionalLibs} ${MAGICK++_LIBRARIES})
ENDIF(MAGICK++_FOUND)
SET(SRCs image matrix2x2 paving qat qat-2D vector2d ../common/mathematic)
ADD_EXECUTABLE(qat-2D ${SRCs})
TARGET_LINK_LIBRARIES(qat-2D ${optionalLibs})
##########Check if libVol exists
FIND_PACKAGE(Vol REQUIRED)
IF(VOL_FOUND)
INCLUDE_DIRECTORIES(${VOL_INCLUDE_DIR})
SET(optionalLibs ${optionalLibs} ${VOL_LIBRARIES})
ENDIF(VOL_FOUND)
##########Check if libLongVol exists
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/")
FIND_PACKAGE(Longvol REQUIRED)
##tclap
INCLUDE_DIRECTORIES(${AQA_Transform_SOURCE_DIR}/src/tclap)
IF(LONGVOL_FOUND)
INCLUDE_DIRECTORIES(${LONGVOL_INCLUDE_DIR})
SET(optionalLibs ${optionalLibs} ${LONGVOL_LIBRARIES})
ENDIF(LONGVOL_FOUND)
SET(SRCs qat-3D qat3d image3d paving3d vector3d ../common/mathematic)
ADD_EXECUTABLE(qat-3D ${SRCs})
TARGET_LINK_LIBRARIES(qat-3D ${optionalLibs})
add_subdirectory(2D)
add_subdirectory(3D)
add_subdirectory(tools)
##########Check if libMagick++ exists
FIND_PACKAGE(Magick REQUIRED)
##tclap
INCLUDE_DIRECTORIES(${AQA_Transform_SOURCE_DIR}/src/tclap)
IF(MAGICK++_FOUND)
INCLUDE_DIRECTORIES(${MAGICK++_INCLUDE_DIR})
SET(optionalLibs ${optionalLibs} ${MAGICK++_LIBRARIES})
ENDIF(MAGICK++_FOUND)
SET(SRCs QATPhantom2D ../2D/paving ../2D/image ../2D/vector2d ../common/mathematic ../common/color)
ADD_EXECUTABLE(QATPhantom2D ${SRCs})
TARGET_LINK_LIBRARIES(QATPhantom2D ${optionalLibs})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment