Fix cmake generation warnings on Windows.
A target must exist before its properties can be set. Defer libwebm target rename on windows until after creation of the webm library target. Change-Id: I29c5e90f1f653a00ff156316c03b0ffd78e9a998
This commit is contained in:
parent
2b2c196558
commit
686664eba2
@ -31,12 +31,6 @@ add_cxx_preproc_definition("__STDC_LIMIT_MACROS")
|
||||
|
||||
# Set up compiler flags and build properties.
|
||||
include_directories("${LIBWEBM_SRC_DIR}")
|
||||
if (WIN32)
|
||||
# Use libwebm and libwebm.lib for project and library name on Windows (instead
|
||||
# webm and webm.lib).
|
||||
set_target_properties(webm PROPERTIES PROJECT_LABEL libwebm)
|
||||
set_target_properties(webm PROPERTIES PREFIX lib)
|
||||
endif ()
|
||||
|
||||
if (MSVC)
|
||||
add_cxx_flag_if_supported("/W4")
|
||||
@ -326,6 +320,13 @@ add_library(webm STATIC ${libwebm_common_sources}
|
||||
$<TARGET_OBJECTS:mkvmuxer>
|
||||
$<TARGET_OBJECTS:mkvparser>)
|
||||
|
||||
if (WIN32)
|
||||
# Use libwebm and libwebm.lib for project and library name on Windows (instead
|
||||
# webm and webm.lib).
|
||||
set_target_properties(webm PROPERTIES PROJECT_LABEL libwebm)
|
||||
set_target_properties(webm PROPERTIES PREFIX lib)
|
||||
endif ()
|
||||
|
||||
add_executable(mkvparser_sample ${mkvparser_sample_sources})
|
||||
target_link_libraries(mkvparser_sample LINK_PUBLIC webm)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user