Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 73bb0cf5 authored by promayon's avatar promayon
Browse files

FIXED (tentative) multi CEP project


git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@592 ec899d31-69d1-42ba-9299-647d76f65fb3
parent fdd9e622
......@@ -4,8 +4,8 @@
# not installed. In the latter this module will use the build directory
#
# Prior to calling find(CamiTK), you can set which version you like to use
# set(CAMITK_VER_MAJ "2")
# set(CAMITK_VER_MIN "1")
# set(CAMITK_VER_MAJ "1")
# set(CAMITK_VER_MIN "4")
#
# Once this module has run, the following variables will be properly defined
# CAMITK_FOUND - system has CamiTK
......@@ -27,25 +27,40 @@ endif()
# CamiTK short version name we are looking for
set(CAMITK_SHORT_VERSION_STRING "camitk-${CAMITK_VER_MAJ}.${CAMITK_VER_MIN}")
# first check if we can use the build version directly
find_path(CAMITK_ROOT_DIR_GUESS
# CAMITK_MULTI_CEP is not set if find(CamiTK) is called by a single CamiTK Extension Project
# if there is a multitude of CEP, set CAMITK_MULTI_CEP to TRUE in the global CMakeLists.txt
if (NOT CAMITK_MULTI_CEP)
# first check if we can use the build version directly
find_path(CAMITK_ROOT_DIR_GUESS
NAMES CamiTKAPI.h
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/../camitk/core
)
set(CAMITK_ROOT_DIR_GUESS_TESTED TRUE CACHE BOOL "Is variable ${CAMITK_ROOT_DIR_GUESS} already tested?")
if (CAMITK_ROOT_DIR_GUESS AND NOT CAMITK_ROOT_DIR_GUESS_TESTED)
)
set(CAMITK_ROOT_DIR_GUESS_TESTED TRUE CACHE BOOL "Is variable ${CAMITK_ROOT_DIR_GUESS} already tested?")
if (CAMITK_ROOT_DIR_GUESS AND NOT CAMITK_ROOT_DIR_GUESS_TESTED)
set(CAMITK_IS_INSTALLED FALSE)
# if this directory was checkouted inside camitk-timc, CAMITK_INSTALL_ROOT could be already defined by CMake when camitk-timc/camitk was parsed/configured
# in this case, DO NOT reset CAMITK_INSTALL_ROOT
if (NOT CAMITK_INSTALL_ROOT)
set(CAMITK_INSTALL_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/..) # default install dir
endif()
# camitk is not installed yet, use build dir for include and libs
set(CAMITK_BUILD_ROOT ${CMAKE_CURRENT_BINARY_DIR}/..)
else()
set(CAMITK_IS_INSTALLED TRUE)
endif()
else()
set(CAMITK_IS_INSTALLED FALSE)
# if this directory was checkouted inside camitk-timc, CAMITK_INSTALL_ROOT could be already defined by CMake when camitk-timc/camitk was parsed/configured
# in this case, DO NOT reset CAMITK_INSTALL_ROOT
if (NOT CAMITK_INSTALL_ROOT)
set(CAMITK_INSTALL_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/..) # default install dir
endif()
# camitk is not installed yet, use build dir for include and libs
set(CAMITK_BUILD_ROOT ${CMAKE_CURRENT_BINARY_DIR}/..)
else()
set(CAMITK_IS_INSTALLED TRUE)
endif()
# This is a multi CEP, CAMITK_INSTALL_ROOT should be set
message("Find CamiTK inside multi CEP: ${CAMITK_INSTALL_ROOT}")
endif() # CAMITK_MULTI_CEP
if (NOT CAMITK_INSTALL_ROOT)
# name of the camitk core lib (as defined in CamiTKVariables)
......@@ -149,4 +164,3 @@ else()
message(FATAL_ERROR "Cannot find CamiTK core, please set the CAMITK_INSTALL_ROOT variable")
endif()
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