Commit a8149da7 authored by promayon's avatar promayon
Browse files

FIXED only CAMITK_VERSION and CAMITK_INSTALL_DIR are shown in the first cmake...

FIXED only CAMITK_VERSION and CAMITK_INSTALL_DIR are shown in the first cmake run (ROOT_DIR_GUESS had no reason to be visible)


git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@95 ec899d31-69d1-42ba-9299-647d76f65fb3
parent db5843b8
std::string FIND_CAMITK_STRING = "# - Try to find CamiTK\n# Once done, this will define\n#\n# CAMITK_FOUND - system has CamiTK\n# CAMITK_INSTALL_ROOT - root installation for CamiTK\n# CAMITK_INCLUDE_DIRECTORIES - the CamiTK include directories\n# CAMITK_LIBRARIES - link these to use CamiTK\n# ... \n# and all the other goodies\n#\n# Once found it is then easy to just use the CamiTK macros\n# to build your extensions\n\n# This the my extension version, should be the same as the CamiTK version you are looking for\n# TODO integrate this as parameters of the find camitk package\nset(CAMITK_VER_MAJ \"2\")\nset(CAMITK_VER_MIN \"1\")\n\n# CamiTK short version name we are looking for\nset(CAMITK_SHORT_VERSION_STRING \"camitk-${CAMITK_VER_MAJ}.${CAMITK_VER_MIN}\")\n\nif (NOT CAMITK_INSTALL_ROOT) \n # name of the camitk core lib (as defined in CamiTKVariables)\n set(CAMITK_CORE_LIB_TEMP \"camitkcore\")\n\n # directory structure from install dir to look for CamiTKAPI.h\n set(CAMITK_INCLUDE_DIR_SUFFIX_TEMP \"include/${CAMITK_SHORT_VERSION_STRING}/${CAMITK_CORE_LIB_TEMP}\")\n\n # find the caracteristic header using a (reasonably) long good list for the guess\n find_path(CAMITK_ROOT_DIR_GUESS\n NAMES CamiTKAPI.h\n PATHS \"/usr\"\n \"/usr/local\"\n \"C:/Programs\"\n \"C:/Programs/camitk\"\n \"C:/Dev\"\n \"C:/Dev/camitk\"\n \"${CMAKE_CURRENT_SOURCE_DIR}/..\"\n \"${CMAKE_CURRENT_SOURCE_DIR}/../camitk\"\n \"${CMAKE_CURRENT_SOURCE_DIR}/../camitktimc\"\n \"${CMAKE_CURRENT_SOURCE_DIR}/../camitk-timc\"\n PATH_SUFFIXES \"${CAMITK_INCLUDE_DIR_SUFFIX_TEMP}\"\n )\n\n # if guess is alright\n if (CAMITK_ROOT_DIR_GUESS) \n string(REGEX REPLACE \"${CAMITK_INCLUDE_DIR_SUFFIX_TEMP}\" \"\" CAMITK_INSTALL_ROOT_TEMP ${CAMITK_ROOT_DIR_GUESS})\n set(CAMITK_INSTALL_ROOT ${CAMITK_INSTALL_ROOT_TEMP} CACHE PATHS \"${CAMITK_SHORT_VERSION_STRING} install root\" FORCE)\n else()\n set(CAMITK_INSTALL_ROOT "" CACHE PATHS \"${CAMITK_SHORT_VERSION_STRING} install root\")\n endif()\nendif()\n\nif(NOT ${CAMITK_INSTALL_ROOT} EQUAL \"\")\n\n # advertise the success\n message(STATUS \"Found ${CAMITK_SHORT_VERSION_STRING}: ${CAMITK_INSTALL_ROOT}\")\n set(CAMITK_FOUND TRUE)\n\n # Check dependencies\n find_package(Qt4 REQUIRED)\n include(${QT_USE_FILE})\n set (QT_USE_QT3SUPPORT OFF)\n\n # Find VTK\n find_package(VTK REQUIRED)\n include(${VTK_USE_FILE})\n\n # set CamiTK build variables\n set (CAMITK_BIN_DIR ${CAMITK_INSTALL_ROOT}/bin CACHE PATH \"CamiTK bin dir.\" FORCE)\n set (CAMITK_LIB_DIR ${CAMITK_INSTALL_ROOT}/lib/${CAMITK_SHORT_VERSION_STRING} CACHE PATH \"CamiTK lib dir.\" FORCE)\n set (CAMITK_INCLUDE_DIR ${CAMITK_INSTALL_ROOT}/include/${CAMITK_SHORT_VERSION_STRING} CACHE PATH \"CamiTK include dir.\" FORCE)\n set (CAMITK_TESTDATA_DIR ${CAMITK_INSTALL_ROOT}/share/${CAMITK_SHORT_VERSION_STRING}/testdata CACHE PATH \"CamiTK share dir. for test data\" FORCE)\n mark_as_advanced(CAMITK_BIN_DIR CAMITK_LIB_DIR CAMITK_INCLUDE_DIR CAMITK_TESTDATA_DIR)\n\n # Needed due to installation reason\n link_directories(${CAMITK_INSTALL_ROOT}/lib)\n \n # update module path\n set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CAMITK_LIB_DIR}/cmake)\n\n # include useful modules\n include(CamiTKVariables)\n include(CamiTKMacros)\n\n # set install path\n set (CMAKE_INSTALL_PREFIX ${CAMITK_INSTALL_ROOT} CACHE PATH \"Path to install dir (deduced from CAMITK_INSTALL_ROOT)\" FORCE)\n\n # check the following to define the proper output variables for an external extension\n # during compilation, set where everything (lib, exe, shared) goes\n set (EXTENSION_BUILD_DIR ${CMAKE_BINARY_DIR})\n set (EXTENSION_BIN_DIR ${EXTENSION_BUILD_DIR}/bin CACHE PATH \"CamiTK extension bin dir.\" FORCE)\n set (EXTENSION_LIB_DIR ${EXTENSION_BUILD_DIR}/lib CACHE PATH \"CamiTK extension lib dir.\" FORCE)\n set (EXTENSION_INCLUDE_DIR ${EXTENSION_BUILD_DIR}/include CACHE PATH \"CamiTK extension include dir.\" FORCE)\n set (EXTENSION_TESTDATA_DIR ${EXTENSION_BUILD_DIR}/share/testdata CACHE PATH \"CamiTK share dir. for test data\" FORCE)\n # the \"normal\" user does not need to see this\n mark_as_advanced(EXTENSION_BUILD_DIR EXTENSION_BIN_DIR EXTENSION_LIB_DIR EXTENSION_INCLUDE_DIR EXTENSION_TESTDATA_DIR)\n\n # Setup CMake Variable\n set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXTENSION_BIN_DIR} CACHE PATH \"Single directory for all runtimes.\" FORCE)\n set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${EXTENSION_BIN_DIR} CACHE PATH \"Single directory for all dynamic/shared libs.\" FORCE)\n set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${EXTENSION_LIB_DIR} CACHE PATH \"Single directory for all archives.\" FORCE)\n\n # no need to see this\n mark_as_advanced ( CMAKE_RUNTIME_OUTPUT_DIRECTORY CMAKE_LIBRARY_OUTPUT_DIRECTORY CMAKE_ARCHIVE_OUTPUT_DIRECTORY)\n\nelse()\n message(FATAL_ERROR \"Cannot find CamiTK core, please set the CAMITK_INSTALL_ROOT variable\")\nendif()\n";
std::string FIND_CAMITK_STRING = "# - Try to find CamiTK\n# Once done, this will define\n#\n# CAMITK_FOUND - system has CamiTK\n# CAMITK_INSTALL_ROOT - root installation for CamiTK\n# CAMITK_INCLUDE_DIRECTORIES - the CamiTK include directories\n# CAMITK_LIBRARIES - link these to use CamiTK\n# ... \n# and all the other goodies\n#\n# Once found it is then easy to just use the CamiTK macros\n# to build your extensions\n\n# This the my extension version, should be the same as the CamiTK version you are looking for\n# TODO integrate this as parameters of the find camitk package\nset(CAMITK_VER_MAJ \"2\")\nset(CAMITK_VER_MIN \"1\")\n\n# CamiTK short version name we are looking for\nset(CAMITK_SHORT_VERSION_STRING \"camitk-${CAMITK_VER_MAJ}.${CAMITK_VER_MIN}\")\n\nif (NOT CAMITK_INSTALL_ROOT) \n # name of the camitk core lib (as defined in CamiTKVariables)\n set(CAMITK_CORE_LIB_TEMP \"camitkcore\")\n\n # directory structure from install dir to look for CamiTKAPI.h\n set(CAMITK_INCLUDE_DIR_SUFFIX_TEMP \"include/${CAMITK_SHORT_VERSION_STRING}/${CAMITK_CORE_LIB_TEMP}\")\n\n # find the caracteristic header using a (reasonably) long good list for the guess\n find_path(CAMITK_ROOT_DIR_GUESS\n NAMES CamiTKAPI.h\n PATHS \"/usr\"\n \"/usr/local\"\n \"C:/Programs\"\n \"C:/Programs/camitk\"\n \"C:/Dev\"\n \"C:/Dev/camitk\"\n $ENV{CAMITK_DIR}\n \"${CMAKE_CURRENT_SOURCE_DIR}/..\"\n \"${CMAKE_CURRENT_SOURCE_DIR}/../camitk\"\n \"${CMAKE_CURRENT_SOURCE_DIR}/../camitktimc\"\n \"${CMAKE_CURRENT_SOURCE_DIR}/../camitk-timc\"\n PATH_SUFFIXES \"${CAMITK_INCLUDE_DIR_SUFFIX_TEMP}\"\n )\n\n mark_as_advanced(CAMITK_ROOT_DIR_GUESS)\n\n set(CAMITK_VERSION \"${CAMITK_VER_MAJ}.${CAMITK_VER_MIN}\" CACHE STRING \"The CamiTK version to find\")\n\n # if guess is alright\n if (CAMITK_ROOT_DIR_GUESS) \n string(REGEX REPLACE \"${CAMITK_INCLUDE_DIR_SUFFIX_TEMP}\" \"\" CAMITK_INSTALL_ROOT_TEMP ${CAMITK_ROOT_DIR_GUESS})\n set(CAMITK_INSTALL_ROOT ${CAMITK_INSTALL_ROOT_TEMP} CACHE PATH \"${CAMITK_SHORT_VERSION_STRING} install root\" FORCE)\n else()\n set(CAMITK_INSTALL_ROOT "" CACHE PATH \"${CAMITK_SHORT_VERSION_STRING} install root\")\n endif()\nendif()\n\nif(NOT ${CAMITK_INSTALL_ROOT} EQUAL \"\")\n\n # advertise the success\n message(STATUS \"Found ${CAMITK_SHORT_VERSION_STRING}: ${CAMITK_INSTALL_ROOT}\")\n set(CAMITK_FOUND TRUE)\n\n # Check dependencies\n find_package(Qt4 REQUIRED)\n include(${QT_USE_FILE})\n set (QT_USE_QT3SUPPORT OFF)\n\n # Find VTK\n find_package(VTK REQUIRED)\n include(${VTK_USE_FILE})\n\n # set CamiTK build variables\n set (CAMITK_BIN_DIR ${CAMITK_INSTALL_ROOT}/bin CACHE PATH \"CamiTK bin dir.\" FORCE)\n set (CAMITK_LIB_DIR ${CAMITK_INSTALL_ROOT}/lib/${CAMITK_SHORT_VERSION_STRING} CACHE PATH \"CamiTK lib dir.\" FORCE)\n set (CAMITK_INCLUDE_DIR ${CAMITK_INSTALL_ROOT}/include/${CAMITK_SHORT_VERSION_STRING} CACHE PATH \"CamiTK include dir.\" FORCE)\n set (CAMITK_TESTDATA_DIR ${CAMITK_INSTALL_ROOT}/share/${CAMITK_SHORT_VERSION_STRING}/testdata CACHE PATH \"CamiTK share dir. for test data\" FORCE)\n mark_as_advanced(CAMITK_BIN_DIR CAMITK_LIB_DIR CAMITK_INCLUDE_DIR CAMITK_TESTDATA_DIR)\n\n # Needed due to installation reason\n link_directories(${CAMITK_INSTALL_ROOT}/lib)\n \n # update module path\n set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CAMITK_LIB_DIR}/cmake)\n\n # include useful modules\n include(CamiTKVariables)\n include(CamiTKMacros)\n\n # set install path\n set (CMAKE_INSTALL_PREFIX ${CAMITK_INSTALL_ROOT} CACHE PATH \"Path to install dir (deduced from CAMITK_INSTALL_ROOT)\" FORCE)\n\n # check the following to define the proper output variables for an external extension\n # during compilation, set where everything (lib, exe, shared) goes\n set (EXTENSION_BUILD_DIR ${CMAKE_BINARY_DIR})\n set (EXTENSION_BIN_DIR ${EXTENSION_BUILD_DIR}/bin CACHE PATH \"CamiTK extension bin dir.\" FORCE)\n set (EXTENSION_LIB_DIR ${EXTENSION_BUILD_DIR}/lib CACHE PATH \"CamiTK extension lib dir.\" FORCE)\n set (EXTENSION_INCLUDE_DIR ${EXTENSION_BUILD_DIR}/include CACHE PATH \"CamiTK extension include dir.\" FORCE)\n set (EXTENSION_TESTDATA_DIR ${EXTENSION_BUILD_DIR}/share/testdata CACHE PATH \"CamiTK share dir. for test data\" FORCE)\n # the \"normal\" user does not need to see this\n mark_as_advanced(EXTENSION_BUILD_DIR EXTENSION_BIN_DIR EXTENSION_LIB_DIR EXTENSION_INCLUDE_DIR EXTENSION_TESTDATA_DIR)\n\n # Setup CMake Variable\n set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXTENSION_BIN_DIR} CACHE PATH \"Single directory for all runtimes.\" FORCE)\n set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${EXTENSION_BIN_DIR} CACHE PATH \"Single directory for all dynamic/shared libs.\" FORCE)\n set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${EXTENSION_LIB_DIR} CACHE PATH \"Single directory for all archives.\" FORCE)\n\n # no need to see this\n mark_as_advanced ( CMAKE_RUNTIME_OUTPUT_DIRECTORY CMAKE_LIBRARY_OUTPUT_DIRECTORY CMAKE_ARCHIVE_OUTPUT_DIRECTORY)\n\nelse()\n message(FATAL_ERROR \"Cannot find CamiTK core, please set the CAMITK_INSTALL_ROOT variable\")\nendif()\n";
Supports Markdown
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