aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/gmsh/linking-and-naming.diff
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/gmsh/linking-and-naming.diff')
-rw-r--r--vcpkg/ports/gmsh/linking-and-naming.diff49
1 files changed, 49 insertions, 0 deletions
diff --git a/vcpkg/ports/gmsh/linking-and-naming.diff b/vcpkg/ports/gmsh/linking-and-naming.diff
new file mode 100644
index 0000000..d219115
--- /dev/null
+++ b/vcpkg/ports/gmsh/linking-and-naming.diff
@@ -0,0 +1,49 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 46937b2..67ddec5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1748,6 +1748,7 @@ endforeach()
+ if(ENABLE_BUILD_LIB)
+ add_library(lib STATIC ${GMSH_SRC})
+ set_target_properties(lib PROPERTIES OUTPUT_NAME gmsh)
++ target_link_libraries(lib ${LINK_LIBRARIES})
+ if(MSVC)
+ set_target_properties(lib PROPERTIES DEBUG_POSTFIX d)
+ if(ENABLE_MSVC_STATIC_RUNTIME)
+@@ -1793,26 +1794,23 @@ endif()
+
+ # binary targets
+ if(HAVE_FLTK)
+- if(ENABLE_BUILD_DYNAMIC)
+- add_executable(gmsh WIN32 src/common/Main.cpp)
+- target_link_libraries(gmsh shared)
+- else()
+- add_executable(gmsh WIN32 src/common/Main.cpp ${GMSH_SRC})
+- endif()
++ add_executable(gmsh WIN32 src/common/Main.cpp)
+ # we could add this to create a minimal app bundle even without install
+ # if(APPLE AND NOT ENABLE_OS_SPECIFIC_INSTALL)
+ # set_target_properties(gmsh PROPERTIES MACOSX_BUNDLE ON
+ # MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/utils/misc/gmsh_dev.plist)
+ # endif()
+ else()
+- if(ENABLE_BUILD_DYNAMIC)
+- add_executable(gmsh src/common/Main.cpp)
+- target_link_libraries(gmsh shared)
+- else()
+- add_executable(gmsh src/common/Main.cpp ${GMSH_SRC})
+- endif()
++ add_executable(gmsh src/common/Main.cpp)
++endif()
++if(TARGET shared)
++ target_link_libraries(gmsh shared)
++elseif(TARGET lib)
++ target_link_libraries(gmsh lib)
++else()
++ target_sources(gmsh ${GMSH_SRC})
+ endif()
+-target_link_libraries(gmsh ${LINK_LIBRARIES})
++set_target_properties(gmsh PROPERTIES PDB_NAME gmsh.exe)
+
+ # OS specific linker options
+ if(WIN32 AND NOT MSVC)