Skip to content
Snippets Groups Projects
Commit 5936ced3 authored by Aleric Inglewood's avatar Aleric Inglewood
Browse files

SNOW-240: Fix libjson naming madness, again, for standalone.

SNOW-240 was actually about adding the whole search.
While this has been done, there is one issue left:
On linux (and remember, all of this is about standalone)
the libjson packages of distributions don't have this
complex compiler version baked into their name.

See also the last comment on SNOW-240:
https://jira.secondlife.com/browse/SNOW-240?focusedCommentId=205305&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-205305

This patch fixes this issue by first searching for
libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so
and when that fails search for the system package
library file libjson.so.
parent d0a25a41
No related branches found
No related tags found
No related merge requests found
...@@ -61,6 +61,7 @@ Aimee Trescothick ...@@ -61,6 +61,7 @@ Aimee Trescothick
Alejandro Rosenthal Alejandro Rosenthal
VWR-1184 VWR-1184
Aleric Inglewood Aleric Inglewood
SNOW-240
SNOW-522 SNOW-522
SNOW-626 SNOW-626
SNOW-756 SNOW-756
......
...@@ -21,7 +21,12 @@ EXEC_PROGRAM(${CMAKE_CXX_COMPILER} ...@@ -21,7 +21,12 @@ EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
# Try to find a library that was compiled with the same compiler version as we currently use.
SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so) SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so)
IF (STANDALONE)
# On standalone, assume that the system installed library was compiled with the used compiler.
SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson.so)
ENDIF (STANDALONE)
FIND_LIBRARY(JSONCPP_LIBRARY FIND_LIBRARY(JSONCPP_LIBRARY
NAMES ${JSONCPP_NAMES} NAMES ${JSONCPP_NAMES}
PATHS /usr/lib /usr/local/lib PATHS /usr/lib /usr/local/lib
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment