Skip to content

Commit 9b27e12

Browse files
authored
Cmake patches (#149)
* Add property to export all symbols to create shared library on MSVC. * Set pkgconfig to correct install directory so vcpkg doesn't require a patch
1 parent 132bb05 commit 9b27e12

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ foreach(TARGET ${AV_TARGETS})
5555
target_link_libraries(${TARGET} PRIVATE ws2_32)
5656
endif()
5757

58+
if(MSVC AND TYPE STREQUAL "SHARED")
59+
set_target_properties(${TARGET} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
60+
endif()
61+
5862
add_library(${AV_NAMESPACE}::${TARGET} ALIAS ${TARGET})
5963
endforeach()
6064

@@ -146,7 +150,7 @@ if (AVCPP_NOT_SUBPROJECT)
146150
)
147151

148152
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libavcpp.pc"
149-
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig")
153+
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
150154

151155
endif()
152156
endif()

0 commit comments

Comments
 (0)