mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-04 18:06:22 +03:00
0026389: The Visual Studio solution of OCCT generated by CMake should have all build configurations
the choice of OCCT build type moved to generated projects debug library search removed from 3rdparty search mechanism draw.bat receive 3 arguments: compiler, bitness and build type
This commit is contained in:
parent
d7b60a9f30
commit
fa0cbe5511
@ -2,13 +2,7 @@ cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
|
||||
|
||||
set (CMAKE_SUPPRESS_REGENERATION TRUE)
|
||||
|
||||
# set build configurations list
|
||||
if (NOT BUILD_CONFIGURATION)
|
||||
set (BUILD_CONFIGURATION "Release" CACHE STRING "Build type of OCCT" FORCE)
|
||||
SET_PROPERTY(CACHE BUILD_CONFIGURATION PROPERTY STRINGS Release Debug RelWithDebInfo)
|
||||
endif()
|
||||
|
||||
set (CMAKE_CONFIGURATION_TYPES ${BUILD_CONFIGURATION} CACHE INTERNAL "" FORCE)
|
||||
set (CMAKE_CONFIGURATION_TYPES Release Debug RelWithDebInfo CACHE INTERNAL "" FORCE)
|
||||
|
||||
# set type of OCCT libraries
|
||||
if (NOT BUILD_LIBRARY_TYPE)
|
||||
@ -60,8 +54,6 @@ endif()
|
||||
# copy samples to install directory
|
||||
set (INSTALL_SAMPLES OFF CACHE BOOL "Copy OCCT samples to install directory")
|
||||
|
||||
set (CMAKE_BUILD_TYPE ${BUILD_CONFIGURATION} CACHE INTERNAL "Build type of OCCT" FORCE )
|
||||
|
||||
# install dir of the built project
|
||||
set (INSTALL_DIR "" CACHE PATH "Directory that will contain install files of OCCT" )
|
||||
set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE )
|
||||
@ -102,9 +94,6 @@ endmacro()
|
||||
# include occt macros
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
# BUILD_POSTFIX variable is used by all toolkit cmakelists.txt projects
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
|
||||
# include the patched or original list of modules
|
||||
# list <MODULENAME>_TOOLKITS is created foreach module and contains its toolkits
|
||||
# list <OCCT_MODULES> will contain all modules
|
||||
@ -267,23 +256,26 @@ if (3RDPARTY_LIBRARY_DIRS)
|
||||
link_directories (${3RDPARTY_LIBRARY_DIRS})
|
||||
endif()
|
||||
|
||||
# Get all used variables: OS_WITH_BIT, COMPILER, BUILD_POSTFIX
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
# Get all used variables: OS_WITH_BIT, COMPILER
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
# build directories
|
||||
string (TOUPPER "${BUILD_CONFIGURATION}" TAIL_OF_OUTPUT_VARNAME)
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
|
||||
set (OUTPUT_LIBRARY_DIR ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX})
|
||||
set (OUTPUT_BINARY_DIR ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX})
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
|
||||
set ("CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${TAIL_OF_OUTPUT_VARNAME}" "${OUTPUT_LIBRARY_DIR}")
|
||||
set ("CMAKE_RUNTIME_OUTPUT_DIRECTORY_${TAIL_OF_OUTPUT_VARNAME}" "${OUTPUT_BINARY_DIR}")
|
||||
set ("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${TAIL_OF_OUTPUT_VARNAME}" "${OUTPUT_LIBRARY_DIR}")
|
||||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
|
||||
if (WIN32)
|
||||
set ("CMAKE_LIBRARY_OUTPUT_DIRECTORY_${TAIL_OF_OUTPUT_VARNAME}" "${OUTPUT_BINARY_DIR}")
|
||||
if (WIN32)
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
|
||||
message (STATUS "\nInfo: Collecting all OCCT header files into ${CMAKE_BINARY_DIR}/inc ...")
|
||||
@ -297,9 +289,13 @@ COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR
|
||||
#endif()
|
||||
|
||||
if ("${INSTALL_DIR}" STREQUAL "")
|
||||
message (FATAL_ERROR "INSTALL_DIR variable is empty. It's required to define installation directory")
|
||||
else()
|
||||
get_filename_component (CMAKE_BINARY_DIR_PARENT ${CMAKE_BINARY_DIR} DIRECTORY)
|
||||
|
||||
set (INSTALL_DIR "${CMAKE_BINARY_DIR_PARENT}/install" CACHE PATH "Directory that will contain install files of OCCT" FORCE)
|
||||
set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE )
|
||||
|
||||
message (STATUS "INSTALL_DIR has been set as ${INSTALL_DIR}")
|
||||
else()
|
||||
|
||||
OCCT_INSTALL_FILE_OR_DIR ("data" "${INSTALL_DIR}")
|
||||
OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_DIR}/samples")
|
||||
@ -339,21 +335,18 @@ else()
|
||||
|
||||
# DRAW.BAT or DRAW.SH
|
||||
if (NOT "${BUILD_PATCH_DIR}" STREQUAL "" AND EXISTS "${BUILD_PATCH_DIR}/adm/templates/draw.${SCRIPT_EXT}")
|
||||
install(FILES "${BUILD_PATCH_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" PERMISSIONS
|
||||
install (FILES "${BUILD_PATCH_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||
else()
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" PERMISSIONS
|
||||
install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
|
||||
endif()
|
||||
OCCT_COPY_FILE_OR_DIR ("adm/templates/draw.${SCRIPT_EXT}" "${CMAKE_BINARY_DIR}")
|
||||
|
||||
set (SUB_CUSTOM "custom_${COMPILER}_${COMPILER_BITNESS}.${SCRIPT_EXT}")
|
||||
if ("${BUILD_CONFIGURATION}" STREQUAL "Debug")
|
||||
set (SUB_CUSTOM "custom_${COMPILER}_${COMPILER_BITNESS}_${BUILD_POSTFIX}.${SCRIPT_EXT}")
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
set (ADDITIONAL_CUSTOM_CONTENT "\nif exist \"%~dp0${SUB_CUSTOM}\" (\n call \"%~dp0${SUB_CUSTOM}\" %1 %2 %3 \n)")
|
||||
set (ADDITIONAL_CUSTOM_CONTENT "\nif exist \"%~dp0${SUB_CUSTOM}\" (\n call \"%~dp0${SUB_CUSTOM}\" %VCVER% %ARCH% %CASDEB% \n)")
|
||||
else()
|
||||
set (ADDITIONAL_CUSTOM_CONTENT "\nif [ -e \"\${aScriptPath}/${SUB_CUSTOM}\" ]; then\n source \"\${aScriptPath}/${SUB_CUSTOM}\" \"\${COMPILER}\" \"\${WOKSTATION}\${ARCH}\" \"\${CASDEB}\" \nfi")
|
||||
endif()
|
||||
@ -379,7 +372,7 @@ else()
|
||||
|
||||
OCCT_CONFIGURE ("adm/templates/env.build.${SCRIPT_EXT}.in" "env.${SCRIPT_EXT}")
|
||||
OCCT_CONFIGURE ("adm/templates/env.${SCRIPT_EXT}.in" "env.install.${SCRIPT_EXT}")
|
||||
install(FILES "${CMAKE_BINARY_DIR}/env.install.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" RENAME "env.${SCRIPT_EXT}")
|
||||
install (FILES "${CMAKE_BINARY_DIR}/env.install.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" RENAME "env.${SCRIPT_EXT}")
|
||||
endif()
|
||||
|
||||
# RESOURCES
|
||||
|
@ -1,12 +1,10 @@
|
||||
#
|
||||
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler and build_postfix
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEBUG)
|
||||
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
|
||||
# define 3RDPARTY_${PRODUCT_NAME}_DIR variable is it isn't defined
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DIR)
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DIR "" CACHE PATH "The directory containing ${PRODUCT_NAME}")
|
||||
@ -52,35 +50,13 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEB
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
|
||||
|
||||
# first of all, search for debug version of a library if build type is debug
|
||||
if (DEFINED IS_BUILD_DEBUG)
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME_DEBUG}
|
||||
PATHS
|
||||
"${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}"
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DIR}/lib"
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DIR}/libd"
|
||||
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_LIB}
|
||||
NO_DEFAULT_PATH)
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME_DEBUG})
|
||||
endif()
|
||||
|
||||
# if build type is release or debug version of library isn't found - search for release version of one
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_LIBRARY}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_LIBRARY "3RDPARTY_${PRODUCT_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "${PRODUCT_NAME} library" FORCE)
|
||||
|
||||
if (DEFINED IS_BUILD_DEBUG)
|
||||
message (STATUS "Warning: debug version of ${PRODUCT_NAME} library isn't found (${LIBRARY_NAME_DEBUG}) in ${3RDPARTY_${PRODUCT_NAME}_DIR}/lib(d). Search for release one")
|
||||
endif()
|
||||
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME} PATHS
|
||||
"${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}"
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DIR}/lib"
|
||||
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_LIB}
|
||||
NO_DEFAULT_PATH)
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME})
|
||||
endif()
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME} PATHS
|
||||
"${3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR}"
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DIR}/lib"
|
||||
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_LIB}
|
||||
NO_DEFAULT_PATH)
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_LIBRARY ${LIBRARY_NAME})
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_LIBRARY_DIR)
|
||||
@ -109,35 +85,14 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEB
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
|
||||
|
||||
if (DEFINED IS_BUILD_DEBUG)
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL "${LIBRARY_NAME_DEBUG}"
|
||||
PATHS
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}"
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DIR}/bin"
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DIR}/bind"
|
||||
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_DLL}
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL "${LIBRARY_NAME_DEBUG}")
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${PRODUCT_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${PRODUCT_NAME}_DLL}")
|
||||
set (3RDPARTY_${PRODUCT_NAME}_DLL "3RDPARTY_${PRODUCT_NAME}_DLL-NOTFOUND" CACHE FILEPATH "${PRODUCT_NAME} shared library" FORCE)
|
||||
|
||||
if (DEFINED IS_BUILD_DEBUG)
|
||||
message (STATUS "Warning: debug version of ${PRODUCT_NAME} dll isn't found (${LIBRARY_NAME_DEBUG}) in ${3RDPARTY_${PRODUCT_NAME}_DIR}/bin(d). Search for release one")
|
||||
endif()
|
||||
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL "${LIBRARY_NAME}" PATHS
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}"
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DIR}/bin"
|
||||
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_DLL}
|
||||
NO_DEFAULT_PATH)
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL "${LIBRARY_NAME}" PATHS
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DLL_DIR}"
|
||||
"${3RDPARTY_${PRODUCT_NAME}_DIR}/bin"
|
||||
${3RDPARTY_${PRODUCT_NAME}_ADDITIONAL_PATH_FOR_DLL}
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${PRODUCT_NAME}_DLL "${LIBRARY_NAME}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED 3RDPARTY_${PRODUCT_NAME}_DLL_DIR)
|
||||
@ -176,19 +131,49 @@ macro (THIRDPARTY_PRODUCT PRODUCT_NAME HEADER_NAME LIBRARY_NAME LIBRARY_NAME_DEB
|
||||
if (INSTALL_${PRODUCT_NAME})
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
|
||||
if (WIN32)
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}")
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES "${3RDPARTY_${PRODUCT_NAME}_DLL}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
|
||||
else()
|
||||
get_filename_component(ABS_PATH ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} REALPATH)
|
||||
if ("${PRODUCT_NAME}" STREQUAL "FREEIMAGE")
|
||||
get_filename_component(FREEIMLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
|
||||
install (FILES "${ABS_PATH}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}" RENAME ${FREEIMLIB}.3)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${FREEIMLIB}.3)
|
||||
endif()
|
||||
if("${PRODUCT_NAME}" STREQUAL "GL2PS")
|
||||
get_filename_component(GL2PSLIB ${3RDPARTY_${PRODUCT_NAME}_LIBRARY} NAME)
|
||||
install (FILES "${ABS_PATH}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}" RENAME ${GL2PSLIB}.1)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${GL2PSLIB}.1)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
|
@ -72,7 +72,6 @@ endforeach(CDIR)
|
||||
|
||||
list( FIND USED_TOOLKITS ${PROJECT_NAME} isFOUND)
|
||||
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
# Create project for toolkit
|
||||
if ("${USED_TOOLKITS}" STREQUAL "" OR NOT ${isFOUND} EQUAL -1)
|
||||
foreach (MODULE ${OCCT_MODULES})
|
||||
@ -83,17 +82,36 @@ if ("${USED_TOOLKITS}" STREQUAL "" OR NOT ${isFOUND} EQUAL -1)
|
||||
endforeach()
|
||||
if (isEXE)
|
||||
add_executable (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES})
|
||||
install (TARGETS ${PROJECT_NAME} DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}" )
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
else()
|
||||
add_library (${PROJECT_NAME} ${USED_SRCFILES} ${USED_INCFILES})
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}"
|
||||
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}")
|
||||
CONFIGURATIONS Release
|
||||
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin"
|
||||
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin"
|
||||
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (TARGETS ${PROJECT_NAME}
|
||||
CONFIGURATIONS Debug
|
||||
RUNTIME DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind"
|
||||
ARCHIVE DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
LIBRARY DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
if (MSVC)
|
||||
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}/${PROJECT_NAME}.pdb
|
||||
install (FILES ${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind/${PROJECT_NAME}.pdb
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}")
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -11,7 +11,7 @@ endif()
|
||||
# store ENV{FREETYPE_DIR}
|
||||
SET (CACHED_FREETYPE_DIR $ENV{FREETYPE_DIR})
|
||||
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler and build_postfix
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
@ -209,14 +209,32 @@ endif()
|
||||
if (INSTALL_FREETYPE)
|
||||
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
|
||||
if (WIN32)
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}")
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES "${3RDPARTY_FREETYPE_DLL}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
else()
|
||||
get_filename_component(ABS_PATH ${3RDPARTY_FREETYPE_LIBRARY} REALPATH)
|
||||
get_filename_component(FREETYPELIB ${3RDPARTY_FREETYPE_LIBRARY} NAME)
|
||||
install (FILES "${ABS_PATH}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}" RENAME ${FREETYPELIB}.6)
|
||||
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${FREETYPELIB}.6)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${FREETYPELIB}.6)
|
||||
install (FILES "${ABS_PATH}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${FREETYPELIB}.6)
|
||||
endif()
|
||||
|
||||
set (USED_3RDPARTY_FREETYPE_DIR "")
|
||||
|
@ -19,17 +19,6 @@ macro (OCCT_CHECK_AND_UNSET_GROUP VARNAME)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# BUILD_POSTFIX, IS_BUILD_DEBUG variables
|
||||
macro (OCCT_MAKE_BUILD_POSTFIX)
|
||||
if ("${BUILD_CONFIGURATION}" STREQUAL "Debug")
|
||||
set (BUILD_POSTFIX "d")
|
||||
set (IS_BUILD_DEBUG "")
|
||||
else()
|
||||
set (BUILD_POSTFIX "")
|
||||
OCCT_CHECK_AND_UNSET (IS_BUILD_DEBUG)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# COMPILER_BITNESS variable
|
||||
macro (OCCT_MAKE_COMPILER_BITNESS)
|
||||
math (EXPR COMPILER_BITNESS "32 + 32*(${CMAKE_SIZEOF_VOID_P}/8)")
|
||||
|
@ -1,7 +1,5 @@
|
||||
# tbb
|
||||
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
|
||||
if (NOT DEFINED INSTALL_TBB)
|
||||
set (INSTALL_TBB OFF CACHE BOOL "Is tbb required to be copied into install directory")
|
||||
endif()
|
||||
@ -60,7 +58,7 @@ if (WIN32 AND NOT DEFINED 3RDPARTY_TBBMALLOC_DLL_DIR)
|
||||
set (3RDPARTY_TBBMALLOC_DLL_DIR "" CACHE FILEPATH "The directory containing tbb malloc shared library")
|
||||
endif()
|
||||
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler and build_postfix
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
# search for product directory inside 3RDPARTY_DIR directory
|
||||
@ -100,8 +98,6 @@ OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
# set (TBB_COMPILER_FOLER ${COMPILER})
|
||||
#endif()
|
||||
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
|
||||
# search for tbb and tbb malloc library in defined 3rdparty directory
|
||||
foreach (LIBRARY_NAME TBB TBBMALLOC)
|
||||
if (NOT WIN32)
|
||||
@ -127,37 +123,14 @@ foreach (LIBRARY_NAME TBB TBBMALLOC)
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}")
|
||||
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY "3RDPARTY_${LIBRARY_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "Path to library of ${LIBRARY_NAME}" FORCE)
|
||||
|
||||
# first of all, search for debug version of a library if build type is debug
|
||||
if (DEFINED IS_BUILD_DEBUG)
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_LIBRARY ${LIBRARY_NAME}_debug
|
||||
PATHS
|
||||
"${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}"
|
||||
"${3RDPARTY_TBB_DIR}/libd/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
|
||||
"${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_LIBRARY ${LIBRARY_NAME}_debug)
|
||||
endif()
|
||||
|
||||
# if build type is release or debug version of library isn't found - search for release version of one
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY}")
|
||||
set (3RDPARTY_${LIBRARY_NAME}_LIBRARY "3RDPARTY_${LIBRARY_NAME}_LIBRARY-NOTFOUND" CACHE FILEPATH "Path to library of ${LIBRARY_NAME}" FORCE)
|
||||
|
||||
if (DEFINED IS_BUILD_DEBUG)
|
||||
message (STATUS "Warning: debug version of ${LIBRARY_NAME} library isn't found (${LIBRARY_NAME}_debug) in ${3RDPARTY_TBB_DIR}/lib(d). Search for release one")
|
||||
endif()
|
||||
|
||||
string (TOLOWER "${LIBRARY_NAME}" lower_LIBRARY_NAME)
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_LIBRARY ${lower_LIBRARY_NAME}
|
||||
PATHS
|
||||
"${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}"
|
||||
"${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
|
||||
NO_DEFAULT_PATH)
|
||||
string (TOLOWER "${LIBRARY_NAME}" lower_LIBRARY_NAME)
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_LIBRARY ${lower_LIBRARY_NAME} PATHS
|
||||
"${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}"
|
||||
"${3RDPARTY_TBB_DIR}/lib/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_LIBRARY ${LIBRARY_NAME})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_LIBRARY_DIR}")
|
||||
@ -181,34 +154,13 @@ foreach (LIBRARY_NAME TBB TBBMALLOC)
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL}")
|
||||
set (3RDPARTY_${LIBRARY_NAME}_DLL "3RDPARTY_${LIBRARY_NAME}_DLL-NOTFOUND" CACHE FILEPATH "Path to shared library of ${LIBRARY_NAME}" FORCE)
|
||||
|
||||
if (DEFINED IS_BUILD_DEBUG)
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_DLL ${LIBRARY_NAME}_debug
|
||||
PATHS
|
||||
"${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}"
|
||||
"${3RDPARTY_TBB_DIR}/bind/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
|
||||
"${3RDPARTY_TBB_DIR}/bin/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_DLL ${LIBRARY_NAME}_debug)
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL}")
|
||||
set (3RDPARTY_${LIBRARY_NAME}_DLL "3RDPARTY_${LIBRARY_NAME}_DLL-NOTFOUND" CACHE FILEPATH "Path to shared library of ${LIBRARY_NAME}" FORCE)
|
||||
|
||||
if (DEFINED IS_BUILD_DEBUG)
|
||||
message (STATUS "Warning: debug version of ${LIBRARY_NAME} dll isn't found (${LIBRARY_NAME}_debug) in ${3RDPARTY_TBB_DIR}/bin(d). Search for release one")
|
||||
endif()
|
||||
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_DLL ${LIBRARY_NAME}
|
||||
PATHS
|
||||
"${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}"
|
||||
"${3RDPARTY_TBB_DIR}/bin/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
|
||||
NO_DEFAULT_PATH)
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_DLL ${LIBRARY_NAME} PATHS
|
||||
"${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}"
|
||||
"${3RDPARTY_TBB_DIR}/bin/${TBB_ARCH_NAME}/${TBB_COMPILER_FOLER}"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
# second search if previous one do not find anything
|
||||
find_library (3RDPARTY_${LIBRARY_NAME}_DLL ${LIBRARY_NAME})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT 3RDPARTY_${LIBRARY_NAME}_DLL_DIR OR NOT EXISTS "${3RDPARTY_${LIBRARY_NAME}_DLL_DIR}")
|
||||
@ -247,12 +199,44 @@ if (INSTALL_TBB)
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
|
||||
if (WIN32)
|
||||
install (FILES ${3RDPARTY_TBB_DLL} ${3RDPARTY_TBBMALLOC_DLL} DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}")
|
||||
install (FILES ${3RDPARTY_TBB_DLL} ${3RDPARTY_TBBMALLOC_DLL}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES ${3RDPARTY_TBB_DLL} ${3RDPARTY_TBBMALLOC_DLL}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES ${3RDPARTY_TBB_DLL} ${3RDPARTY_TBBMALLOC_DLL}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
else()
|
||||
get_filename_component(TBBLIB ${3RDPARTY_TBB_LIBRARY} NAME)
|
||||
get_filename_component(TBBMALLOCLIB ${3RDPARTY_TBBMALLOC_LIBRARY} NAME)
|
||||
install (FILES ${3RDPARTY_TBB_LIBRARY}.2 DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}" RENAME ${TBBLIB}.2)
|
||||
install (FILES ${3RDPARTY_TBBMALLOC_LIBRARY}.2 DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}" RENAME ${TBBMALLOCLIB}.2)
|
||||
|
||||
install (FILES ${3RDPARTY_TBB_LIBRARY}.2
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${TBBLIB}.2)
|
||||
install (FILES ${3RDPARTY_TBB_LIBRARY}.2
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${TBBLIB}.2)
|
||||
install (FILES ${3RDPARTY_TBB_LIBRARY}.2
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${TBBLIB}.2)
|
||||
|
||||
install (FILES ${3RDPARTY_TBBMALLOC_LIBRARY}.2
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${TBBMALLOCLIB}.2)
|
||||
install (FILES ${3RDPARTY_TBBMALLOC_LIBRARY}.2
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME ${TBBMALLOCLIB}.2)
|
||||
install (FILES ${3RDPARTY_TBBMALLOC_LIBRARY}.2
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME ${TBBMALLOCLIB}.2)
|
||||
endif()
|
||||
|
||||
set (USED_3RDPARTY_TBB_DIR "")
|
||||
|
@ -297,12 +297,11 @@ endforeach()
|
||||
|
||||
# install tcltk
|
||||
if (INSTALL_TCL)
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler and build_postfix
|
||||
# include occt macros. compiler_bitness, os_wiht_bit, compiler
|
||||
OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
|
||||
|
||||
OCCT_MAKE_OS_WITH_BITNESS()
|
||||
OCCT_MAKE_COMPILER_SHORT_NAME()
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
|
||||
if (WIN32)
|
||||
# tcl 8.6 requires zlib. install all dlls from tcl bin folder that may contain zlib also
|
||||
@ -310,17 +309,41 @@ if (INSTALL_TCL)
|
||||
# collect and install all dlls from tcl/tk dll dirs
|
||||
file (GLOB TCL_DLLS "${3RDPARTY_TCL_DLL_DIR}/*.dll")
|
||||
file (GLOB TK_DLLS "${3RDPARTY_TK_DLL_DIR}/*.dll")
|
||||
install (FILES ${TCL_DLLS} ${TK_DLLS} DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}")
|
||||
install (FILES ${TCL_DLLS} ${TK_DLLS}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES ${TCL_DLLS} ${TK_DLLS}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES ${TCL_DLLS} ${TK_DLLS}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
else()
|
||||
get_filename_component(3RDPARTY_TCL_LIBRARY_REALPATH ${3RDPARTY_TCL_LIBRARY} REALPATH)
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}")
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (FILES ${3RDPARTY_TCL_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
|
||||
get_filename_component(3RDPARTY_TK_LIBRARY_REALPATH ${3RDPARTY_TK_LIBRARY} REALPATH)
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH} DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}")
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (FILES ${3RDPARTY_TK_LIBRARY_REALPATH}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
|
||||
endif()
|
||||
|
||||
if (TCL_TCLSH_VERSION)
|
||||
# tcl is required to install in lib folder (without ${BUILD_POSTFIX})
|
||||
# tcl is required to install in lib folder (without)
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl8" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tcl${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
install (DIRECTORY "${3RDPARTY_TCL_LIBRARY_DIR}/tk${TCL_TCLSH_VERSION}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
|
||||
|
@ -45,7 +45,6 @@ if (NOT VTK_FOUND AND NOT 3RDPARTY_VTK_DIR OR NOT EXISTS "${3RDPARTY_VTK_DIR}")
|
||||
set (3RDPARTY_VTK_DIR "3RDPARTY_VTK_DIR-NOTFOUND" CACHE PATH "The directory containing vtk product" FORCE)
|
||||
endif()
|
||||
|
||||
OCCT_MAKE_BUILD_POSTFIX()
|
||||
set(VTK_VERSION "")
|
||||
if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
|
||||
get_filename_component(3RDPARTY_VTK_DIR_NAME "${3RDPARTY_VTK_DIR}" NAME)
|
||||
@ -55,13 +54,11 @@ if (3RDPARTY_VTK_DIR AND EXISTS "${3RDPARTY_VTK_DIR}")
|
||||
set (3RDPARTY_VTK_INCLUDE_DIR "${3RDPARTY_VTK_DIR}/include/vtk-${VTK_VERSION}" CACHE FILEPATH "The directory containing includes of VTK" FORCE)
|
||||
endif()
|
||||
if (NOT 3RDPARTY_VTK_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_VTK_LIBRARY_DIR}")
|
||||
if(EXISTS "${3RDPARTY_VTK_DIR}/lib${BUILD_POSTFIX}")
|
||||
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_DIR}/lib${BUILD_POSTFIX}" CACHE FILEPATH "The directory containing libs of VTK" FORCE)
|
||||
else()
|
||||
if (NOT "${BUILD_POSTFIX}" STREQUAL "" AND EXISTS "${3RDPARTY_VTK_DIR}/lib")
|
||||
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_DIR}/lib" CACHE FILEPATH "The directory containing libs of VTK" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
if(EXISTS "${3RDPARTY_VTK_DIR}/lib")
|
||||
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_DIR}/lib" CACHE FILEPATH "The directory containing libs of VTK" FORCE)
|
||||
elseif (EXISTS "${3RDPARTY_VTK_DIR}/lib")
|
||||
set (3RDPARTY_VTK_LIBRARY_DIR "${3RDPARTY_VTK_DIR}/lib" CACHE FILEPATH "The directory containing libs of VTK" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
if(3RDPARTY_VTK_LIBRARY_DIR)
|
||||
list (APPEND 3RDPARTY_LIBRARY_DIRS "${3RDPARTY_VTK_LIBRARY_DIR}")
|
||||
@ -110,12 +107,10 @@ set (VTK_DLL_NAMES vtkCommonComputationalGeometry-${VTK_VERSION}.dll
|
||||
# search for dll directory
|
||||
if (WIN32)
|
||||
if (NOT 3RDPARTY_VTK_DLL_DIR OR NOT EXISTS "${3RDPARTY_VTK_DLL_DIR}")
|
||||
if(EXISTS "${3RDPARTY_VTK_DIR}/bin${BUILD_POSTFIX}")
|
||||
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DIR}/bin${BUILD_POSTFIX}" CACHE FILEPATH "The directory containing dll of VTK" FORCE)
|
||||
else()
|
||||
if (NOT "${BUILD_POSTFIX}" STREQUAL "" AND EXISTS "${3RDPARTY_VTK_DIR}/bin")
|
||||
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DIR}/bin" CACHE FILEPATH "The directory containing dll of VTK" FORCE)
|
||||
endif()
|
||||
if(EXISTS "${3RDPARTY_VTK_DIR}/bin")
|
||||
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DIR}/bin" CACHE FILEPATH "The directory containing dll of VTK" FORCE)
|
||||
elseif (EXISTS "${3RDPARTY_VTK_DIR}/bind")
|
||||
set (3RDPARTY_VTK_DLL_DIR "${3RDPARTY_VTK_DIR}/bind" CACHE FILEPATH "The directory containing dll of VTK" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -144,7 +139,15 @@ if (INSTALL_VTK)
|
||||
if (NOT 3RDPARTY_VTK_DLL OR NOT EXISTS "${3RDPARTY_VTK_DLL}")
|
||||
list (APPEND 3RDPARTY_NOT_INCLUDED "${3RDPARTY_VTK_DLL}")
|
||||
else()
|
||||
install (FILES ${3RDPARTY_VTK_DLL} DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin${BUILD_POSTFIX}")
|
||||
install (FILES ${3RDPARTY_VTK_DLL}
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES ${3RDPARTY_VTK_DLL}
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
|
||||
install (FILES ${3RDPARTY_VTK_DLL}
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
|
||||
endif()
|
||||
endforeach()
|
||||
OCCT_CHECK_AND_UNSET(3RDPARTY_VTK_DLL)
|
||||
@ -152,7 +155,18 @@ if (INSTALL_VTK)
|
||||
else ()
|
||||
foreach(VTK_DLL_NAME ${VTK_DLL_NAMES})
|
||||
string(REPLACE ".dll" ".so.1" VTK_DLL_NAME "${VTK_DLL_NAME}")
|
||||
install(FILES "${3RDPARTY_VTK_LIBRARY_DIR}/lib${VTK_DLL_NAME}" DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib${BUILD_POSTFIX}" RENAME "lib${VTK_DLL_NAME}")
|
||||
install(FILES "${3RDPARTY_VTK_LIBRARY_DIR}/lib${VTK_DLL_NAME}"
|
||||
CONFIGURATIONS Release
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME "lib${VTK_DLL_NAME}")
|
||||
install(FILES "${3RDPARTY_VTK_LIBRARY_DIR}/lib${VTK_DLL_NAME}"
|
||||
CONFIGURATIONS RelWithDebInfo
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/lib"
|
||||
RENAME "lib${VTK_DLL_NAME}")
|
||||
install(FILES "${3RDPARTY_VTK_LIBRARY_DIR}/lib${VTK_DLL_NAME}"
|
||||
CONFIGURATIONS Debug
|
||||
DESTINATION "${INSTALL_DIR}/${OS_WITH_BIT}/${COMPILER}/libd"
|
||||
RENAME "lib${VTK_DLL_NAME}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
|
@ -1,6 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='@BUILD_CONFIGURATION@|@X_COMPILER_BITNESS@'">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@X_COMPILER_BITNESS@'">
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|@X_COMPILER_BITNESS@'">
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
</LocalDebuggerEnvironment>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@X_COMPILER_BITNESS@'">
|
||||
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
|
||||
PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
|
||||
</LocalDebuggerEnvironment>
|
||||
|
@ -2,16 +2,14 @@ echo off
|
||||
|
||||
if "%VCVER%" == "@COMPILER@" (
|
||||
if "%ARCH%" == "@COMPILER_BITNESS@" (
|
||||
if "%CASDEB%" == "@BUILD_POSTFIX@" (
|
||||
set "TCL_DIR=@USED_3RDPARTY_TCL_DIR@"
|
||||
set "FREETYPE_DIR=@USED_3RDPARTY_FREETYPE_DIR@"
|
||||
set "FREEIMAGE_DIR=@USED_3RDPARTY_FREEIMAGE_DIR@"
|
||||
set "FREEIMAGEPLUS_DIR=@USED_3RDPARTY_FREEIMAGEPLUS_DIR@"
|
||||
set "GL2PS_DIR=@USED_3RDPARTY_GL2PS_DIR@"
|
||||
set "TBB_DIR=@USED_3RDPARTY_TBB_DIR@"
|
||||
set "VTK_DIR=@USED_3RDPARTY_VTK_DIR@"
|
||||
set "CSF_TestDataPath=@TESTS_SHAPES_DIR@"
|
||||
)
|
||||
set "TCL_DIR=@USED_3RDPARTY_TCL_DIR@"
|
||||
set "FREETYPE_DIR=@USED_3RDPARTY_FREETYPE_DIR@"
|
||||
set "FREEIMAGE_DIR=@USED_3RDPARTY_FREEIMAGE_DIR@"
|
||||
set "FREEIMAGEPLUS_DIR=@USED_3RDPARTY_FREEIMAGEPLUS_DIR@"
|
||||
set "GL2PS_DIR=@USED_3RDPARTY_GL2PS_DIR@"
|
||||
set "TBB_DIR=@USED_3RDPARTY_TBB_DIR@"
|
||||
set "VTK_DIR=@USED_3RDPARTY_VTK_DIR@"
|
||||
set "CSF_TestDataPath=@TESTS_SHAPES_DIR@"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -2,15 +2,13 @@
|
||||
|
||||
if [ "$COMPILER" == "@COMPILER@" ]; then
|
||||
if [ "$ARCH" == "@COMPILER_BITNESS@" ]; then
|
||||
if [ "$CASDEB" == "@BUILD_POSTFIX@" ]; then
|
||||
export TCL_DIR="@USED_3RDPARTY_TCL_DIR@"
|
||||
export FREETYPE_DIR="@USED_3RDPARTY_FREETYPE_DIR@"
|
||||
export FREEIMAGE_DIR="@USED_3RDPARTY_FREEIMAGE_DIR@"
|
||||
export GL2PS_DIR="@USED_3RDPARTY_GL2PS_DIR@"
|
||||
export TBB_DIR="@USED_3RDPARTY_TBB_DIR@"
|
||||
export VTK_DIR="@USED_3RDPARTY_VTK_DIR@"
|
||||
export CSF_TestDataPath="@TESTS_SHAPES_DIR@"
|
||||
fi
|
||||
export TCL_DIR="@USED_3RDPARTY_TCL_DIR@"
|
||||
export FREETYPE_DIR="@USED_3RDPARTY_FREETYPE_DIR@"
|
||||
export FREEIMAGE_DIR="@USED_3RDPARTY_FREEIMAGE_DIR@"
|
||||
export GL2PS_DIR="@USED_3RDPARTY_GL2PS_DIR@"
|
||||
export TBB_DIR="@USED_3RDPARTY_TBB_DIR@"
|
||||
export VTK_DIR="@USED_3RDPARTY_VTK_DIR@"
|
||||
export CSF_TestDataPath="@TESTS_SHAPES_DIR@"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
@echo off
|
||||
|
||||
rem Setup environment and launch DRAWEXE
|
||||
call "%~dp0env.bat"
|
||||
call "%~dp0env.bat" %1 %2 %3
|
||||
|
||||
echo Hint: use "pload ALL" command to load standard commands
|
||||
DRAWEXE.exe %*
|
||||
DRAWEXE.exe
|
||||
|
||||
set "PATH=%ORIGIN_PATH%"
|
||||
|
||||
|
@ -5,7 +5,7 @@ set "SCRIPTROOT=%SCRIPTROOT:~0,-1%"
|
||||
|
||||
set "VCVER=@COMPILER@"
|
||||
set "ARCH=@COMPILER_BITNESS@"
|
||||
set "CASDEB=@BUILD_POSTFIX@"
|
||||
set "CASDEB="
|
||||
|
||||
if not ["%1"] == [""] set "VCVER=%1"
|
||||
if not ["%2"] == [""] set "ARCH=%2"
|
||||
@ -15,7 +15,7 @@ if /I ["%3"] == ["debug"] set "CASDEB=d"
|
||||
if /I ["%3"] == ["d"] set "CASDEB=d"
|
||||
|
||||
if exist "%~dp0custom.bat" (
|
||||
call "%~dp0custom.bat" %1 %2 %3
|
||||
call "%~dp0custom.bat" %VCVER% %ARCH% %CASDEB%
|
||||
)
|
||||
|
||||
if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%"
|
||||
|
@ -7,7 +7,7 @@ set "CASROOT=@CMAKE_SOURCE_DIR@"
|
||||
|
||||
set "VCVER=@COMPILER@"
|
||||
set "ARCH=@COMPILER_BITNESS@"
|
||||
set "CASDEB=@BUILD_POSTFIX@"
|
||||
set "CASDEB="
|
||||
|
||||
if not ["%1"] == [""] set "VCVER=%1"
|
||||
if not ["%2"] == [""] set "ARCH=%2"
|
||||
|
@ -10,7 +10,7 @@ fi
|
||||
|
||||
# Read script arguments
|
||||
shopt -s nocasematch
|
||||
export CASDEB="@BUILD_POSTFIX@";
|
||||
export CASDEB="";
|
||||
if [[ "$1" == "debug" ]]; then export CASDEB="d"; fi
|
||||
if [[ "$1" == "d" ]]; then export CASDEB="d"; fi
|
||||
shopt -u nocasematch
|
||||
|
@ -8,7 +8,7 @@ fi
|
||||
|
||||
# Read script arguments
|
||||
shopt -s nocasematch
|
||||
export CASDEB="@BUILD_POSTFIX@";
|
||||
export CASDEB="";
|
||||
if [[ "$1" == "debug" ]]; then export CASDEB="d"; fi
|
||||
if [[ "$1" == "d" ]]; then export CASDEB="d"; fi
|
||||
shopt -u nocasematch
|
||||
|
Loading…
x
Reference in New Issue
Block a user