52 lines
3.1 KiB
Diff
52 lines
3.1 KiB
Diff
--- CMakeLists.txt 2016-11-25 12:52:00.000000000 +0300
|
|
+++ CMakeLists.txt.new 2017-06-05 10:38:15.000000000 +0300
|
|
@@ -755,15 +755,15 @@
|
|
endif()
|
|
|
|
# change custom.bat/sh
|
|
-if (EXISTS "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}")
|
|
- file (READ "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}" CUSTOM_CONTENT)
|
|
-
|
|
- set (CUSTOM_CONTENT "${CUSTOM_CONTENT} ${ADDITIONAL_CUSTOM_CONTENT}")
|
|
-
|
|
- file (WRITE "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}" "${CUSTOM_CONTENT}")
|
|
-else()
|
|
+#if (EXISTS "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}")
|
|
+# file (READ "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}" CUSTOM_CONTENT)
|
|
+#
|
|
+# set (CUSTOM_CONTENT "${CUSTOM_CONTENT} ${ADDITIONAL_CUSTOM_CONTENT}")
|
|
+#
|
|
+# file (WRITE "${INSTALL_DIR}/${INSTALL_DIR_SCRIPT}/custom.${SCRIPT_EXT}" "${CUSTOM_CONTENT}")
|
|
+#else()
|
|
OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${INSTALL_DIR_SCRIPT}")
|
|
-endif()
|
|
+#endif()
|
|
|
|
# write current custom.bat/sh (for install directory)
|
|
set (SUB_CUSTOM_BUILD_NAME "custom_${COMPILER}_${COMPILER_BITNESS}.install.${SCRIPT_EXT}")
|
|
@@ -891,7 +891,8 @@
|
|
list (REMOVE_DUPLICATES OCCT_COMPILE_DEFINITIONS)
|
|
|
|
# export compile definitions and C/C++ flags for each configuration to OpenCASCADE config files
|
|
-foreach (OCCT_CONFIGURATION ${CMAKE_CONFIGURATION_TYPES})
|
|
+#foreach (OCCT_CONFIGURATION ${CMAKE_CONFIGURATION_TYPES})
|
|
+set(OCCT_CONFIGURATION ${CMAKE_BUILD_TYPE})
|
|
set (SET_OpenCASCADE_COMPILE_DEFINITIONS)
|
|
string (TOUPPER "${OCCT_CONFIGURATION}" OCCT_CONFIGURATION_UPPER)
|
|
string (TOLOWER "${OCCT_CONFIGURATION}" OCCT_CONFIGURATION_LOWER)
|
|
@@ -903,10 +904,11 @@
|
|
set (SET_OpenCASCADE_CMAKE_C_FLAGS "${CMAKE_C_FLAGS_${OCCT_CONFIGURATION_UPPER}}")
|
|
set (SET_OpenCASCADE_CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_${OCCT_CONFIGURATION_UPPER}}")
|
|
configure_file("${CMAKE_SOURCE_DIR}/adm/templates/OpenCASCADECompileDefinitionsAndFlags.cmake.in" "OpenCASCADECompileDefinitionsAndFlags-${OCCT_CONFIGURATION_LOWER}.cmake" @ONLY)
|
|
-endforeach()
|
|
+install(FILES "${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-${OCCT_CONFIGURATION_LOWER}.cmake" DESTINATION "${INSTALL_DIR_CMAKE}")
|
|
+#endforeach()
|
|
# install OpenCASCADE config file with compile definitions and C/C++ flags ONLY for current configuration
|
|
-install (CODE "string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWER)")
|
|
-install (CODE "configure_file(\"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)")
|
|
+#install (CODE "string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWER)")
|
|
+#install (CODE "configure_file(\"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" \"${CMAKE_INSTALL_PREFIX}/${INSTALL_DIR_CMAKE}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)")
|
|
|
|
foreach (OCCT_MODULE ${OCCT_MODULES})
|
|
if (BUILD_MODULE_${OCCT_MODULE})
|