Commit 60b41139 authored by promayon's avatar promayon
Browse files

FIXED error when compiling as main subdirectoy (i.e., not as an independant extension)

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@109 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 51fd6147
......@@ -35,6 +35,8 @@ find_path(CAMITK_ROOT_DIR_GUESS
if (CAMITK_ROOT_DIR_GUESS)
set(CAMITK_IS_INSTALLED FALSE)
set(CAMITK_INSTALL_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/..) # default install dir
# 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()
......@@ -92,10 +94,18 @@ if(NOT ${CAMITK_INSTALL_ROOT} EQUAL "")
include(${VTK_USE_FILE})
# set CamiTK build variables
set (CAMITK_BIN_DIR ${CAMITK_INSTALL_ROOT}/bin CACHE PATH "CamiTK bin dir." FORCE)
set (CAMITK_LIB_DIR ${CAMITK_INSTALL_ROOT}/lib/${CAMITK_SHORT_VERSION_STRING} CACHE PATH "CamiTK lib dir." FORCE)
set (CAMITK_INCLUDE_DIR ${CAMITK_INSTALL_ROOT}/include/${CAMITK_SHORT_VERSION_STRING} CACHE PATH "CamiTK include dir." FORCE)
set (CAMITK_TESTDATA_DIR ${CAMITK_INSTALL_ROOT}/share/${CAMITK_SHORT_VERSION_STRING}/testdata CACHE PATH "CamiTK share dir. for test data" FORCE)
if (CAMITK_IS_INSTALLED)
set (CAMITK_BIN_DIR ${CAMITK_INSTALL_ROOT}/bin CACHE PATH "CamiTK bin dir." FORCE)
set (CAMITK_LIB_DIR ${CAMITK_INSTALL_ROOT}/lib/${CAMITK_SHORT_VERSION_STRING} CACHE PATH "CamiTK lib dir." FORCE)
set (CAMITK_INCLUDE_DIR ${CAMITK_INSTALL_ROOT}/include/${CAMITK_SHORT_VERSION_STRING} CACHE PATH "CamiTK include dir." FORCE)
set (CAMITK_TESTDATA_DIR ${CAMITK_INSTALL_ROOT}/share/${CAMITK_SHORT_VERSION_STRING}/testdata CACHE PATH "CamiTK share dir. for test data" FORCE)
else()
# use build directory to get includes and lib
set (CAMITK_BIN_DIR ${CAMITK_BUILD_ROOT}/bin CACHE PATH "CamiTK bin dir." FORCE)
set (CAMITK_LIB_DIR ${CAMITK_BUILD_ROOT}/lib CACHE PATH "CamiTK lib dir." FORCE)
set (CAMITK_INCLUDE_DIR ${CAMITK_BUILD_ROOT}/include CACHE PATH "CamiTK include dir." FORCE)
set (CAMITK_TESTDATA_DIR ${CAMITK_BUILD_ROOT}/share/testdata CACHE PATH "CamiTK share dir. for test data" FORCE)
endif()
mark_as_advanced(CAMITK_BIN_DIR CAMITK_LIB_DIR CAMITK_INCLUDE_DIR CAMITK_TESTDATA_DIR)
# Needed due to installation reason
......
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