MESSAGE(FATAL_ERROR "bbi not found in ${BBTK_DIR}/bin ; ${BBTK_DIR}/Release ; ${BBTK_DIR}/Debug : is bbtk properly built ?")
ENDIF(NOT BBTK_BIN_PATH)
-
+ SET(BBTK_PACKAGE_LIB_PATH bin)
SET(BBTK_BBI "${BBTK_BIN_PATH}/bbi")
SET(BBTK_BBS2CPP "${BBTK_BIN_PATH}/bbs2cpp")
SET(BBTK_BBC "${BBTK_BIN_PATH}/bbc")
# SET (EXECUTABLE_OUTPUT_REL_PATH bin)
# SET (LIBRARY_OUTPUT_REL_PATH bin)
SET(BBTK_BIN_PATH ${BBTK_INSTALL_PREFIX}/bin)
+ SET(BBTK_PACKAGE_LIB_PATH ${BBTK_INSTALL_PREFIX}/lib)
SET(BBTK_BBI "${BBTK_BIN_PATH}/bbi")
SET(BBTK_BBS2CPP "${BBTK_BIN_PATH}/bbs2cpp")
SET(BBTK_BBC "${BBTK_BIN_PATH}/bbc")
ADD_CUSTOM_COMMAND(
OUTPUT ${BBFY_CXX_OUT}
COMMAND
- set ${DLL_PATH} && ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q
+ set Path=${DLL_PATH} && ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q
DEPENDS ${xmlfile}
${BBTK_BBFY_DEPENDENCY}
)
)
INSTALL(
TARGETS bb${BBTK_PACKAGE_NAME}
- DESTINATION lib)
+ DESTINATION ${BBTK_PACKAGE_LIB_PATH})
# CreateFindPackage
SET( LIBRARY_NAME bb${BBTK_PACKAGE_NAME} )
ENDIF(UNIX)
SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS
include/bb${BBTK_PACKAGE_NAME})
-SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS lib)
+SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS ${BBTK_PACKAGE_LIB_PATH})
# REQUIRED BUILD FLAGS
#SET(${LIBRARY_NAME}_REQUIRED_C_FLAGS "")
"graph ${PACKAGE_NAME} 0 0 ${DOC_OUTPUT} \"${BBTK_BBDOC_BUILD_PATH}/${BBTK_PACKAGE_NAME}/header.html\" \"Package ${PACKAGE_NAME} documentation\"\n"
)
+ IF(WIN32)
+ INSTALL(
+ FILES ${OUTPUT_FILE}
+ DESTINATION ${BBTK_BBS_REL_PATH}/${BBTK_PACKAGE_NAME}/appli
+ )
+ ELSE(WIN32)
INSTALL(
FILES ${OUTPUT_FILE}
DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/appli
)
+ ENDIF(WIN32)
#
DEPENDS ${DOC_OUTPUT}
)
+ IF(WIN32)
INSTALL(
DIRECTORY ${BBTK_BBDOC_BUILD_PATH}/${PACKAGE_NAME}
DESTINATION ${BBTK_BBDOC_INSTALL_PATH}
+ #DESTINATION ${BBTK_BBDOC_REL_PATH}
)
-
+ ELSE(WIN32)
+ INSTALL(
+ DIRECTORY ${BBTK_BBDOC_BUILD_PATH}/${PACKAGE_NAME}
+ #DESTINATION ${BBTK_BBDOC_INSTALL_PATH}
+ DESTINATION ${BBTK_BBDOC_REL_PATH}
+ )
+ ENDIF(WIN32)
+
IF(NOT WIN32)
# runs bbtk-make-index as a post install step
# does not work on windaube
COPYONLY
)
GET_FILENAME_COMPONENT(bbs_path ${bbs} PATH)
+
+
+ IF(WIN32)
INSTALL(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/${bbs}
+# DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
+ DESTINATION ${BBTK_BBS_REL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
+ )
+ELSE(WIN32)
+INSTALL(
+ FILES ${CMAKE_CURRENT_SOURCE_DIR}/${bbs}
DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
+# DESTINATION ${BBTK_BBS_REL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
)
-
+ENDIF(WIN32)
ENDFOREACH(bbs)
FILE(APPEND
"${OUTPUT_FILE}"
"endpackage\n"
"#-- EOF ----------------------------------\n"
)
+ IF(WIN32)
+ INSTALL(
+ FILES ${OUTPUT_FILE}
+# DESTINATION ${BBTK_BBS_INSTALL_PATH}
+ DESTINATION ${BBTK_BBS_REL_PATH}
+ )
+ELSE(WIN32)
INSTALL(
FILES ${OUTPUT_FILE}
DESTINATION ${BBTK_BBS_INSTALL_PATH}
+# DESTINATION ${BBTK_BBS_REL_PATH}
)
-
+ENDIF(WIN32)
# Creates the file ${BBTK_PACKAGE_NAME}-appli.bbp
SET(OUTPUT_FILE ${BBTK_BBS_BUILD_PATH}/${BBTK_PACKAGE_NAME}-appli.bbp)
FILE(WRITE
COPYONLY
)
GET_FILENAME_COMPONENT(bbs_path ${bbs} PATH)
+
+
+ IF(WIN32)
+ INSTALL(
+ FILES ${CMAKE_CURRENT_SOURCE_DIR}/${bbs}
+ # DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
+ DESTINATION ${BBTK_BBS_REL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
+ )
+ELSE(WIN32)
INSTALL(
FILES ${CMAKE_CURRENT_SOURCE_DIR}/${bbs}
DESTINATION ${BBTK_BBS_INSTALL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
+ # DESTINATION ${BBTK_BBS_REL_PATH}/${BBTK_PACKAGE_NAME}/${bbs_path}
)
+ENDIF(WIN32)
ENDFOREACH(bbs)
FILE(APPEND
"${OUTPUT_FILE}"
"endpackage\n"
"#-- EOF ----------------------------------\n"
)
+IF(WIN32)
+ INSTALL(
+ FILES ${OUTPUT_FILE}
+ # DESTINATION ${BBTK_BBS_INSTALL_PATH}
+ DESTINATION ${BBTK_BBS_REL_PATH}
+ )
+ELSE(WIN32)
INSTALL(
FILES ${OUTPUT_FILE}
DESTINATION ${BBTK_BBS_INSTALL_PATH}
+ # DESTINATION ${BBTK_BBS_REL_PATH}
)
-
+ENDIF(WIN32)
# ADD_CUSTOM_TARGET(${BBTK_PACKAGE_NAME}.bbp ALL
# DEPENDS ${OUTPUT_FILE}
# )
ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
SET(BBTK_BIN_PATH $(SolutionDir)/$(OutDir))
ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
+ SET(BBTK_LIB_PATH bin)
SET(BBTK_BBS2CPP ${BBTK_BIN_PATH}/bbs2cpp.exe)
SET(BBTK_BBC ${BBTK_BIN_PATH}/bbc.exe)
SET(BBTK_BBI ${BBTK_BIN_PATH}/bbi.exe)
SET(BBTK_BBFY ${BBTK_BIN_PATH}/bbfy.exe)
SET(BBTK_BBDOC ${BBTK_BIN_PATH}/bbdoc.exe)
ELSE(WIN32)
+ SET(BBTK_LIB_PATH lib)
SET(BBTK_BIN_PATH ${EXECUTABLE_OUTPUT_PATH})
SET(BBTK_BBI ${BBTK_BIN_PATH}/bbi)
SET(BBTK_BBS2CPP ${BBTK_BIN_PATH}/bbs2cpp)
SET(BBTK_BBFY ${BBTK_BIN_PATH}/bbfy)
SET(BBTK_BBDOC ${BBTK_BIN_PATH}/bbdoc)
ENDIF(WIN32)
+SET(BBTK_PACKAGE_LIB_PATH ${BBTK_LIB_PATH})
#-----------------------------------------------------------------------------
SET(USE_DOT TRUE)
MAKE_DLL_PATH()
-
- ADD_CUSTOM_COMMAND(
- OUTPUT ${INDEX_OUTPUT}
- COMMAND
- set ${DLL_PATH} cd ${BBTK_BIN_PATH} && ./bbRegeneratePackageDoc -a -q && ./bbRegenerateBoxesLists -q
-
- DEPENDS ${BBTK_PACKAGES_DEPS} bbRegeneratePackageDoc bbRegenerateBoxesLists
- )
-
+
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${INDEX_OUTPUT}
+ COMMAND
+ set Path=${DLL_PATH} && cd ${BBTK_BIN_PATH} && bbRegeneratePackageDoc -a && bbRegenerateBoxesLists
+
+ DEPENDS ${BBTK_PACKAGES_DEPS}
+ )
+
ELSE (WIN32)
# MESSAGE(STATUS "PACKAGE_DEPS=${BBTK_PACKAGES_DEPS}")
ENDIF(USE_VTK)
IF(USE_ITK)
- INSTALL( FILES ${ITK_DIR}/bin/ITKCommon.dll DESTINATION bin/ )
+ INSTALL( FILES ${ITK_DIR}/../../bin/ITKCommon.dll DESTINATION bin/ )
ENDIF(USE_ITK)
IF(USE_WXWIDGETS)
#-----------------------------------------------------------------------------
FILE(GLOB BBTK_HEADERS "*.h")
INSTALL(FILES ${BBTK_HEADERS} DESTINATION include/bbtk)
-INSTALL(TARGETS bbtk DESTINATION lib)
-IF(WIN32)
- INSTALL(TARGETS bbtk DESTINATION bin/)
-ENDIF(WIN32)
+INSTALL(TARGETS bbtk DESTINATION ${BBTK_LIB_PATH})
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
${EXECUTABLE_OUTPUT_REL_PATH}/Release)
ENDIF(UNIX)
SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_INCLUDE_PATHS include/bbtk include/bbtk/ThirdParty)
-SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS lib)
+SET(${LIBRARY_NAME}_INSTALL_TREE_RELATIVE_LIBRARY_PATHS ${BBTK_LIB_PATH})
# OPTIONAL
# - Set the version of your library