cpack for mac

This commit is contained in:
Joachim Schöberl 2015-12-11 14:31:28 +01:00
parent e2edc088da
commit 79ffa00a52
2 changed files with 26 additions and 1 deletions

View File

@ -128,6 +128,7 @@ else(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif(WIN32)
if(APPLE)
# set(MACOSX_BUNDLE ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -undefined dynamic_lookup")
# set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
endif(APPLE)
@ -313,9 +314,22 @@ if(UNIX)
set(CPACK_DEBIAN_PACKAGE_NAME ${CPACK_PACKAGE_NAME})
set(CPACK_PACKAGE_FILE_NAME "netgen-${PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
endif(temp)
include(CPack)
endif(UNIX)
if(APPLE)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/startup2.sh DESTINATION bin)
set(CPACK_GENERATOR "Bundle")
set(CPACK_BUNDLE_NAME "NGSuite")
set(CPACK_BUNDLE_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
set(CPACK_BUNDLE_ICON
${CMAKE_CURRENT_SOURCE_DIR}/../netgen/windows/netgen.ico)
# set(CPACK_BUNDLE_STARTUP_COMMAND /Applications/NGSuite.app/Contents/MacOS/NGSuite)
# set(CPACK_BUNDLE_STARTUP_COMMAND /Applications/NGSuite.app/Contents/Resources/bin/netgen)
set(CPACK_BUNDLE_STARTUP_COMMAND startup.sh)
# set(CPACK_SOURCE_GENERATOR "TGZ")
endif(APPLE)
include(CPack)
#######################################################################
# uninstall target

View File

@ -363,6 +363,8 @@ DLL_HEADER void ExportNetgenMeshing()
.def("FaceDescriptor", static_cast<FaceDescriptor&(Mesh::*)(int)> (&Mesh::GetFaceDescriptor),
bp::return_value_policy<bp::reference_existing_object>())
.def("GetNFaceDescriptors", &Mesh::GetNFD)
.def("__getitem__", FunctionPointer ([](const Mesh & self, PointIndex pi)
{
@ -411,10 +413,19 @@ DLL_HEADER void ExportNetgenMeshing()
{
cout << "generate vol mesh" << endl;
MeshingParameters mp;
mp.optsteps3d = 5;
MeshVolume (mp, self);
OptimizeVolume (mp, self);
}))
.def ("OptimizeVolumeMesh", FunctionPointer
([](Mesh & self)
{
MeshingParameters mp;
mp.optsteps3d = 5;
OptimizeVolume (mp, self);
}))
.def ("Refine", FunctionPointer
([](Mesh & self)
{