Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions Project/CMake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,13 @@ elseif(MSVC)
else()
set(MediaInfoLib_CONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake/mediainfolib")
endif()

set(MediaInfoLib_SOURCES_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../Source)
if(MINGW)
# Work around for cmake generating extra long paths
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/../../Source DESTINATION .)
set(MediaInfoLib_SOURCES_PATH ${CMAKE_CURRENT_BINARY_DIR}/Source)
else()
set(MediaInfoLib_SOURCES_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../Source)
endif()

# On Windows debug library should have 'd' postfix.
if(WIN32)
Expand Down Expand Up @@ -356,6 +361,10 @@ if(NOT TinyXML_FOUND)
list(APPEND MediaInfoLib_SRCS ${MediaInfoLib_SOURCES_PATH}/ThirdParty/tinyxml2/tinyxml2.cpp)
endif()

if(WIN32)
set_source_files_properties(${MediaInfoLib_SRCS} PROPERTIES GENERATED true)
endif()

add_library(mediainfo ${MediaInfoLib_SRCS})
target_include_directories(mediainfo INTERFACE ${INCLUDE_INSTALL_DIR})

Expand Down