Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ ELSE()
ENDIF()
ENDIF()

find_package (Git)
if (!GIT_FOUND)
message (STATUS "GIT not found")
endif ()
add_subdirectory("TIVTC")
add_subdirectory("TDeint")

Expand Down
15 changes: 14 additions & 1 deletion src/TDeint/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,20 @@ Include("Files.cmake")

add_library(${PluginName} SHARED ${TDeint_Sources})

set_target_properties(${PluginName} PROPERTIES "OUTPUT_NAME" "${PluginName}")
if (GIT_FOUND)
execute_process (COMMAND ${GIT_EXECUTABLE} describe --tags --abbrev=0
OUTPUT_VARIABLE ver
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if (ver STREQUAL "")
set_target_properties(${PluginName} PROPERTIES OUTPUT_NAME "${PluginName}")
else ()
set_target_properties(${PluginName} PROPERTIES OUTPUT_NAME "${PluginName}.${ver}")
endif()
else ()
set_target_properties(${PluginName} PROPERTIES OUTPUT_NAME "${PluginName}")
endif ()

if (MINGW)
set_target_properties(${PluginName} PROPERTIES PREFIX "")
set_target_properties(${PluginName} PROPERTIES IMPORT_PREFIX "")
Expand Down
15 changes: 14 additions & 1 deletion src/TIVTC/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,20 @@ Include("Files.cmake")

add_library(${PluginName} SHARED ${TIVTC_Sources})

set_target_properties(${PluginName} PROPERTIES "OUTPUT_NAME" "${PluginName}")
if (GIT_FOUND)
execute_process (COMMAND ${GIT_EXECUTABLE} describe --tags --abbrev=0
OUTPUT_VARIABLE ver
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if (ver STREQUAL "")
set_target_properties(${PluginName} PROPERTIES OUTPUT_NAME "${PluginName}")
else ()
set_target_properties(${PluginName} PROPERTIES OUTPUT_NAME "${PluginName}.${ver}")
endif()
else ()
set_target_properties(${PluginName} PROPERTIES OUTPUT_NAME "${PluginName}")
endif ()

if (MINGW)
set_target_properties(${PluginName} PROPERTIES PREFIX "")
set_target_properties(${PluginName} PROPERTIES IMPORT_PREFIX "")
Expand Down