]> Creatis software - bbtk.git/blob - kernel/appli/bbc/CMakeLists.txt
*** empty log message ***
[bbtk.git] / kernel / appli / bbc / CMakeLists.txt
1 # Relative path to the data used by bbc from data root folder
2 SET(bbc_DATA_REL_PATH_FROM_DATA kernel/bbc)
3 # Relative path to the data used by bbc from bin folder
4 SET(bbc_DATA_REL_PATH_FROM_BIN ../${BBTK_DATA_REL_PATH}/${bbc_DATA_REL_PATH_FROM_DATA})
5
6
7
8 IF(UNIX)
9   # Build tree 
10   SET(bbc_CMAKE_OPTION_FOR_BUILD_TREE "-DBBTK_DIR=${PROJECT_BINARY_DIR}")
11   CONFIGURE_FILE(
12     ${CMAKE_CURRENT_SOURCE_DIR}/main.cxx.in
13     ${BBTK_DATA_BUILD_PATH}/${bbc_DATA_REL_PATH_FROM_DATA}/main.cxx.in
14     COPYONLY
15     )
16   CONFIGURE_FILE(
17     ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt.in
18     ${BBTK_DATA_BUILD_PATH}/${bbc_DATA_REL_PATH_FROM_DATA}/CMakeLists.txt.in
19     COPYONLY
20     )
21   CONFIGURE_FILE(
22     ${CMAKE_CURRENT_SOURCE_DIR}/bbc.sh.in
23     ${BBTK_BINARY_DIR}/bin/bbc
24     @ONLY IMMEDIATE
25     )
26   # Install tree
27   SET(bbc_CMAKE_OPTION_FOR_BUILD_TREE "")
28   CONFIGURE_FILE(
29     ${CMAKE_CURRENT_SOURCE_DIR}/bbc.sh.in
30     ${CMAKE_CURRENT_BINARY_DIR}/bbc
31     @ONLY IMMEDIATE
32     )
33   INSTALL(
34     FILES ${CMAKE_CURRENT_SOURCE_DIR}/main.cxx.in ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt.in
35     DESTINATION ${BBTK_DATA_INSTALL_PATH}/${bbc_DATA_REL_PATH_FROM_DATA}
36     )
37   INSTALL(
38     PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/bbc
39     DESTINATION bin
40     )
41     
42 ELSE(UNIX)
43   # TO DO : bat for win
44 ENDIF(UNIX)