Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Unified Diff: cmake/CMakeLists.txt

Issue 2007093002: CMake: skia_link_arguments.txt repects BUILD_SHARED_LIBS (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cmake/README.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cmake/CMakeLists.txt
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index ed8ec67d8da3b428ae51ec7e264d32b4247cb717..ef0856a3ea338b9942af1edf460d5885ca2a1c58 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -302,9 +302,21 @@ configure_file ("SkUserConfig.h.in" "${userconfig_directory}/SkUserConfig.h")
# skia_link_arguments.txt
set (link_arguments ${CMAKE_BINARY_DIR}/skia_link_arguments.txt)
-file (WRITE ${link_arguments} "-L${CMAKE_BINARY_DIR}\n")
-file (APPEND ${link_arguments} "-lskia\n")
-file (APPEND ${link_arguments} "-Wl,-rpath,${CMAKE_BINARY_DIR}\n")
+if (BUILD_SHARED_LIBS)
+ file (WRITE ${link_arguments} "-L${CMAKE_BINARY_DIR}\n")
+ file (APPEND ${link_arguments} "-lskia\n")
+ file (APPEND ${link_arguments} "-Wl,-rpath,${CMAKE_BINARY_DIR}\n")
+else()
+ file (WRITE ${link_arguments} "${CMAKE_BINARY_DIR}/libskia.a\n")
+ foreach (lib ${libs})
+ if (EXISTS ${lib})
+ get_filename_component(lib_path ${lib} ABSOLUTE)
+ file (APPEND ${link_arguments} "${lib_path}\n")
+ else()
+ file (APPEND ${link_arguments} "-l${lib}\n")
+ endif()
+ endforeach()
+endif()
# skia_compile_arguments.txt
set (compile_arguments ${CMAKE_BINARY_DIR}/skia_compile_arguments.txt)
« no previous file with comments | « no previous file | cmake/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698