Skip to content

Commit

Permalink
Fix compilation on Windows with Clang 15 (#965)
Browse files Browse the repository at this point in the history
Co-authored-by: Dmitry Kazakov <[email protected]>
  • Loading branch information
emmetoneillpdx and dimula73 authored Dec 12, 2023
1 parent bd72d47 commit 3ffb57b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
8 changes: 2 additions & 6 deletions src/framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,8 @@ set_target_properties(mlt PROPERTIES

if(WIN32)
if(MINGW)
install(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libmlt-${MLT_VERSION_MAJOR}.dll"
DESTINATION ${CMAKE_INSTALL_LIBDIR}
RENAME libmlt.dll
)
target_link_options(mlt PRIVATE -Wl,--output-def,libmlt.def)
install(FILES "${CMAKE_BINARY_DIR}/libmlt.def" DESTINATION ${CMAKE_INSTALL_LIBDIR})
target_link_options(mlt PRIVATE -Wl,--output-def,${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libmlt-${MLT_VERSION_MAJOR}.def)
install(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libmlt-${MLT_VERSION_MAJOR}.def" DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_sources(mlt PRIVATE ../win32/win32.c ../win32/strptime.c)
target_link_libraries(mlt PRIVATE Iconv::Iconv)
Expand Down
2 changes: 2 additions & 0 deletions src/framework/mlt_property.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ typedef locale_t mlt_locale_t;
#elif defined(__OpenBSD__)
/* XXX matches __nop_locale glue in libc++ */
typedef void *mlt_locale_t;
#elif (defined _WIN32 && defined _LIBCPP_VERSION)
struct mlt_locale_t;
#else
typedef char *mlt_locale_t;
#endif
Expand Down
8 changes: 2 additions & 6 deletions src/mlt++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,8 @@ set_target_properties(mlt++ PROPERTIES

if(WIN32)
if(MINGW)
install(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libmlt++-${MLT_VERSION_MAJOR}.dll"
DESTINATION ${CMAKE_INSTALL_LIBDIR}
RENAME libmlt++.dll
)
target_link_options(mlt++ PRIVATE -Wl,--output-def,libmlt++.def)
install(FILES "${CMAKE_BINARY_DIR}/libmlt++.def" DESTINATION ${CMAKE_INSTALL_LIBDIR})
target_link_options(mlt++ PRIVATE -Wl,--output-def,${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libmlt++-${MLT_VERSION_MAJOR}.def)
install(FILES "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libmlt++-${MLT_VERSION_MAJOR}.def" DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_compile_definitions(mlt++ PRIVATE MLTPP_EXPORTS)
endif()
Expand Down

0 comments on commit 3ffb57b

Please sign in to comment.