ports/devel/argtable3/files/patch-src_CMakeLists.txt
Jose Alonso Cardenas Marquez 4a507bc80f
devel/argtable3: Improve port
- Add CMAKE options for avoid compile not installable files
- Remove obsolete dependency
- Now this port installs static and shared libraries
- Bump PORTREVISION
Reported by:	diizzy
2024-02-18 17:58:27 -05:00

26 lines
965 B
Text

--- src/CMakeLists.txt.orig 2024-02-18 21:34:25 UTC
+++ src/CMakeLists.txt
@@ -73,7 +73,8 @@ if(BUILD_SHARED_LIBS AND WIN32)
add_library(argtable3 ${ARGTABLE3_SRC_FILES} "${PROJECT_BINARY_DIR}/src/version.rc")
target_compile_definitions(argtable3 INTERFACE argtable3_IMPORTS)
else()
- add_library(argtable3 ${ARGTABLE3_SRC_FILES})
+ add_library(argtable3_static STATIC ${ARGTABLE3_SRC_FILES})
+ add_library(argtable3 SHARED ${ARGTABLE3_SRC_FILES})
endif()
add_library(${ARGTABLE3_PROJECT_NAME}::argtable3 ALIAS argtable3)
@@ -94,6 +95,13 @@ elseif(WIN32)
endif()
install(TARGETS argtable3
+ EXPORT ${ARGTABLE3_PACKAGE_NAME}Config
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+install(TARGETS argtable3_static
EXPORT ${ARGTABLE3_PACKAGE_NAME}Config
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}