mirror of https://github.com/microsoft/vcpkg.git
[dime] add port (#50094)
This commit is contained in:
parent
35a50301d3
commit
7090f9cb7a
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 36b9731..ead5de5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -132,6 +132,8 @@ else()
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION "${DIME_SO_VERSION}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}" SOVERSION ${DIME_SO_VERSION})
|
||||
endif()
|
||||
|
||||
+target_compile_options(${PROJECT_NAME} PRIVATE $<$<CXX_COMPILER_ID:Clang>:-Wno-register>)
|
||||
+
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_CONFIG_H DIME_INTERNAL DIME_DEBUG=$<CONFIG:Debug>)
|
||||
|
||||
if(WIN32)
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 36b9731..fbc54a2 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -372,7 +372,7 @@ if(UNIX OR MINGW)
|
||||
endif()
|
||||
|
||||
configure_package_config_file(${PROJECT_NAME_LOWER}-config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config.cmake"
|
||||
- INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}-${PROJECT_VERSION}
|
||||
+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
|
||||
PATH_VARS CMAKE_INSTALL_LIBDIR
|
||||
)
|
||||
|
||||
@@ -388,12 +388,12 @@ export(
|
||||
)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config-version.cmake"
|
||||
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}-${PROJECT_VERSION}
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
|
||||
COMPONENT development
|
||||
)
|
||||
|
||||
install(EXPORT ${PROJECT_NAME}
|
||||
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}-${PROJECT_VERSION}
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
|
||||
NAMESPACE ${PROJECT_NAME}::
|
||||
FILE ${PROJECT_NAME_LOWER}-export.cmake
|
||||
COMPONENT development
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 36b9731..80cba07 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -160,11 +160,18 @@ target_include_directories(${PROJECT_NAME}
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
-add_executable(dxf2vrml dxf2vrml/dxf2vrml.cpp)
|
||||
-target_link_libraries(dxf2vrml PRIVATE dime)
|
||||
+set(TOOLS_TARGETS)
|
||||
+if(DIME_BUILD_TOOLS)
|
||||
+ find_package(Threads REQUIRED)
|
||||
|
||||
-add_executable(dxfsphere dxfsphere/dxfsphere.cpp)
|
||||
-target_link_libraries(dxfsphere PRIVATE dime)
|
||||
+ add_executable(dxf2vrml dxf2vrml/dxf2vrml.cpp)
|
||||
+ target_link_libraries(dxf2vrml PRIVATE dime Threads::Threads)
|
||||
+
|
||||
+ add_executable(dxfsphere dxfsphere/dxfsphere.cpp)
|
||||
+ target_link_libraries(dxfsphere PRIVATE dime Threads::Threads)
|
||||
+
|
||||
+ set(TOOLS_TARGETS dxf2vrml dxfsphere)
|
||||
+endif()
|
||||
|
||||
# ############################################################################
|
||||
# Add a target to generate API documentation with Doxygen
|
||||
@@ -338,7 +345,7 @@ configure_file(include/config.h.cmake.in config.h)
|
||||
install(DIRECTORY include/${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT development FILES_MATCHING PATTERN "*.h")
|
||||
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.12)
|
||||
- install(TARGETS ${PROJECT_NAME} dxf2vrml dxfsphere EXPORT ${PROJECT_NAME}
|
||||
+ install(TARGETS ${PROJECT_NAME} ${TOOLS_TARGETS} EXPORT ${PROJECT_NAME}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT runtime NAMELINK_COMPONENT development
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT development
|
||||
@@ -349,7 +356,7 @@ if(NOT CMAKE_VERSION VERSION_LESS 3.12)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
- install(TARGETS ${PROJECT_NAME} dxf2vrml dxfsphere EXPORT ${PROJECT_NAME}
|
||||
+ install(TARGETS ${PROJECT_NAME} ${TOOLS_TARGETS} EXPORT ${PROJECT_NAME}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT runtime NAMELINK_SKIP
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT development
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 36b9731..0000000 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -57,17 +57,18 @@
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose type of build, options are Debug, Release, RelWithDebInfo, MinSizeRel." FORCE)
|
||||
endif()
|
||||
# Set common output directories for all targets built.
|
||||
-# First for the generic no-config case (e.g. with mingw)
|
||||
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
-# Second, for multi-config builds (e.g. msvc)
|
||||
-foreach (_config ${CMAKE_CONFIGURATION_TYPES})
|
||||
- string(TOUPPER ${_config} _config)
|
||||
- set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${_config} "${CMAKE_BINARY_DIR}/lib")
|
||||
- set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${_config} "${CMAKE_BINARY_DIR}/lib")
|
||||
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${_config} "${CMAKE_BINARY_DIR}/bin")
|
||||
-endforeach()
|
||||
+if(CMAKE_CONFIGURATION_TYPES)
|
||||
+ foreach (_config ${CMAKE_CONFIGURATION_TYPES})
|
||||
+ string(TOUPPER ${_config} _config_upper)
|
||||
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${_config_upper} "${CMAKE_BINARY_DIR}/lib/${_config}")
|
||||
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${_config_upper} "${CMAKE_BINARY_DIR}/lib/${_config}")
|
||||
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${_config_upper} "${CMAKE_BINARY_DIR}/bin/${_config}")
|
||||
+ endforeach()
|
||||
+else()
|
||||
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
+endif()
|
||||
|
||||
check_symbol_exists(isinf math.h HAVE_ISINF)
|
||||
check_symbol_exists(isnan math.h HAVE_ISNAN)
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO coin3d/dime
|
||||
REF 8cec48a1c27475f040f08a504ca0c59bd88a9d5b
|
||||
SHA512 bffe8a994aac87b697ec000d6e162a505368e0bd3d1031ce17319ad20ec042f4c96b81283c6fa1092e3a53196d576db4a5b1e8d670d8ec9eb82681b71614724e
|
||||
PATCHES
|
||||
fix-cmake.patch
|
||||
fix-clang.patch
|
||||
fix-tools.patch
|
||||
fix-windows-debug-output.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIBS)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
tools DIME_BUILD_TOOLS
|
||||
)
|
||||
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-DDIME_BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
|
||||
-DDIME_BUILD_DOCUMENTATION=OFF
|
||||
-DDIME_BUILD_AWESOME_DOCUMENTATION=OFF
|
||||
-DDIME_BUILD_INTERNAL_DOCUMENTATION=OFF
|
||||
-DDIME_BUILD_DOCUMENTATION_MAN=OFF
|
||||
-DDIME_BUILD_DOCUMENTATION_QTHELP=OFF
|
||||
-DDIME_BUILD_DOCUMENTATION_CHM=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
|
||||
vcpkg_fixup_pkgconfig()
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
if("tools" IN_LIST FEATURES)
|
||||
vcpkg_copy_tools(TOOL_NAMES dxf2vrml dxfsphere AUTO_CLEAN)
|
||||
endif()
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"name": "dime",
|
||||
"version-date": "2025-04-01",
|
||||
"description": "Reading DXF Drawing files",
|
||||
"homepage": "https://github.com/coin3d/dime",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"tools": {
|
||||
"description": "Build tools",
|
||||
"supports": "!ios"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2488,6 +2488,10 @@
|
|||
"baseline": "7.3.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"dime": {
|
||||
"baseline": "2025-04-01",
|
||||
"port-version": 0
|
||||
},
|
||||
"dingo": {
|
||||
"baseline": "0.2.0",
|
||||
"port-version": 0
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "ac461026d1cc0eff7c56bb7f0d06c508c95ab2ef",
|
||||
"version-date": "2025-04-01",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue