void-packages/srcpkgs/freecad/patches/add-smds_memory_limit-utili...

56 lines
2.3 KiB
Diff

Build and install missing binary SMDS_MemoryLimit
Patch with the help of http://forum.freecadweb.org/viewtopic.php?t=4316&start=10#p47658 , change #3
--- src/3rdParty/salomesmesh/CMakeLists.txt.ORI 2016-04-07 03:39:34.000000000 +0200
+++ src/3rdParty/salomesmesh/CMakeLists.txt 2016-05-31 10:20:54.115079806 +0200
@@ -158,6 +158,33 @@
endif(WIN32)
+############################
+# SMDS_MemoryLimit Utility #
+############################
+
+SET(SMDS_MemoryLimit_SRCS
+ src/SMDS/SMDS_MemoryLimit.cpp
+ )
+add_executable(SMDS_MemoryLimit ${SMDS_MemoryLimit_SRCS})
+
+# Note this is IDE specific, not necessarily platform specific
+if(MSVC)
+ set_target_properties(SMDS_MemoryLimit PROPERTIES OUTPUT_NAME "SMDS_MemoryLimit")
+ set_target_properties(SMDS_MemoryLimit PROPERTIES DEBUG_OUTPUT_NAME "SMDS_MemoryLimit")
+ # dirty hack to avoid Debug/Release subdirectory
+ set_target_properties(FreeCADMainCmd PROPERTIES PREFIX "../")
+ set_target_properties(FreeCADMainCmd PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+elseif(MINGW)
+ set_target_properties(SMDS_MemoryLimit PROPERTIES OUTPUT_NAME "SMDS_MemoryLimit")
+ set_target_properties(SMDS_MemoryLimit PROPERTIES DEBUG_OUTPUT_NAME "SMDS_MemoryLimit")
+ set_target_properties(FreeCADMainCmd PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+else(MSVC)
+ set_target_properties(SMDS_MemoryLimit PROPERTIES OUTPUT_NAME "SMDS_MemoryLimit")
+ set_target_properties(SMDS_MemoryLimit PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+ #set_target_properties(SMDS_MemoryLimit PROPERTIES INSTALL_RPATH ${INSTALL_RPATH})
+endif(MSVC)
+
+
##########
# Driver #
##########
@@ -380,12 +407,13 @@
if(WIN32)
- INSTALL(TARGETS SMDS Driver DriverSTL DriverDAT DriverUNV SMESHDS SMESH MEFISTO2 StdMeshers
+ INSTALL(TARGETS SMDS SMDS_MemoryLimit Driver DriverSTL DriverDAT DriverUNV SMESHDS SMESH MEFISTO2 StdMeshers
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
)
else(WIN32)
- INSTALL(TARGETS SMDS Driver DriverSTL DriverDAT DriverUNV SMESHDS SMESH MEFISTO2 StdMeshers
+ INSTALL(TARGETS SMDS SMDS_MemoryLimit Driver DriverSTL DriverDAT DriverUNV SMESHDS SMESH MEFISTO2 StdMeshers
+ RUNTIME DESTINATION bin
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif(WIN32)