[x265] [PATCH] cmake: correct order of linking
deepthi at multicorewareinc.com
deepthi at multicorewareinc.com
Mon Oct 19 13:28:20 CEST 2015
# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1445247748 -19800
# Mon Oct 19 15:12:28 2015 +0530
# Node ID 8589ea49854604d35bd0e84cd06ac82e6dbdc016
# Parent 1bcfea4372d90ceca3db6c262eaaf19147537c27
cmake: correct order of linking
First, the library which needs symbols. Next, the library which resolves symbols.
diff -r 1bcfea4372d9 -r 8589ea498546 source/CMakeLists.txt
--- a/source/CMakeLists.txt Mon Sep 07 17:13:49 2015 +0530
+++ b/source/CMakeLists.txt Mon Oct 19 15:12:28 2015 +0530
@@ -459,6 +459,9 @@
if(ENABLE_SHARED)
add_library(x265-shared SHARED "${PROJECT_BINARY_DIR}/x265.def" ${YASM_OBJS}
${X265_RC_FILE} $<TARGET_OBJECTS:encoder> $<TARGET_OBJECTS:common>)
+ if(EXTRA_LIB)
+ target_link_libraries(x265-shared ${EXTRA_LIB})
+ endif()
target_link_libraries(x265-shared ${PLATFORM_LIBS})
if(MSVC)
set_target_properties(x265-shared PROPERTIES OUTPUT_NAME libx265)
@@ -484,9 +487,6 @@
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
RUNTIME DESTINATION ${BIN_INSTALL_DIR})
endif()
- if(EXTRA_LIB)
- target_link_libraries(x265-shared ${EXTRA_LIB})
- endif()
if(LINKER_OPTIONS)
# set_target_properties can't do list expansion
string(REPLACE ";" " " LINKER_OPTION_STR "${LINKER_OPTIONS}")
More information about the x265-devel
mailing list