Skip to content

Commit 6d88ccd

Browse files
committed
Add versioned name for V8 library.
1 parent 5e5866c commit 6d88ccd

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

FindV8.cmake

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ set(V8_PATHS
5454
~/Library/Frameworks
5555
/Library/Frameworks
5656
/usr/local
57+
/usr/lib
5758
/usr
5859
/sw # Fink
5960
/opt/local # DarwinPorts
@@ -241,6 +242,23 @@ else()
241242
set(V8_LIBRARIES ${V8_LIBRARY})
242243
endif()
243244

245+
set(V8_LIBRARIES_VERSION)
246+
247+
# Set version libraries
248+
if (V8_LIBRARY_DEBUG)
249+
set(V8_LIBRARIES_VERSION
250+
${V8_LIBRARIES_VERSION}
251+
${V8_LIBRARY_DEBUG}.${V8_FIND_VERSION}
252+
)
253+
endif()
254+
255+
if (V8_LIBRARY_RELEASE)
256+
set(V8_LIBRARIES_VERSION
257+
${V8_LIBRARIES_VERSION}
258+
${V8_LIBRARY_RELEASE}.${V8_FIND_VERSION}
259+
)
260+
endif()
261+
244262
find_package_handle_standard_args(V8 DEFAULT_MSG V8_LIBRARY V8_INCLUDE_DIR)
245263

246264
# Base build
@@ -346,6 +364,7 @@ endif()
346364
if(_V8_CMAKE_DEBUG)
347365
message(STATUS "V8_INCLUDE_DIR: ${V8_INCLUDE_DIR}")
348366
message(STATUS "V8_LIBRARIES: ${V8_LIBRARIES}")
367+
message(STATUS "V8_LIBRARIES_VERSION: ${V8_LIBRARIES_VERSION}")
349368
message(STATUS "V8_VERSION: ${V8_VERSION}")
350369
message(STATUS "V8_VERSION_HEX: ${V8_VERSION_HEX}")
351370
message(STATUS "V8_EXECUTABLE: ${V8_EXECUTABLE}")

0 commit comments

Comments
 (0)