/*
- * Copyright (C)2011-2013 D. R. Commander. All Rights Reserved.
+ * Copyright (C)2011-2013, 2016 D. R. Commander. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
String os = System.getProperty("os.name").toLowerCase();
if (os.indexOf("mac") >= 0) {
try {
- System.load("%{__libdir}/libturbojpeg.jnilib");
+ System.load("@CMAKE_INSTALL_FULL_LIBDIR@/libturbojpeg.jnilib");
} catch (java.lang.UnsatisfiedLinkError e2) {
System.load("/usr/lib/libturbojpeg.jnilib");
}
} else {
try {
- System.load("%{__libdir}/libturbojpeg.so");
+ System.load("@CMAKE_INSTALL_FULL_LIBDIR@/libturbojpeg.so");
} catch (java.lang.UnsatisfiedLinkError e3) {
- String libdir = "%{__libdir}";
- if (libdir.equals("/opt/libjpeg-turbo/lib64")) {
- System.load("/opt/libjpeg-turbo/lib32/libturbojpeg.so");
- } else if (libdir.equals("/opt/libjpeg-turbo/lib32")) {
- System.load("/opt/libjpeg-turbo/lib64/libturbojpeg.so");
+ String libdir = "@CMAKE_INSTALL_FULL_LIBDIR@";
+ if (libdir.equals("@CMAKE_INSTALL_DEFAULT_PREFIX@/lib64")) {
+ System.load("@CMAKE_INSTALL_DEFAULT_PREFIX@/lib32/libturbojpeg.so");
+ } else if (libdir.equals("@CMAKE_INSTALL_DEFAULT_PREFIX@/lib32")) {
+ System.load("@CMAKE_INSTALL_DEFAULT_PREFIX@/lib64/libturbojpeg.so");
} else {
throw e3;
}