Linux linking fix + new Travis check
This commit is contained in:
parent
6b9da3f2a2
commit
34fb23c380
|
@ -27,3 +27,5 @@ before_script:
|
||||||
|
|
||||||
script: make
|
script: make
|
||||||
|
|
||||||
|
after_success:
|
||||||
|
- demo/caesiumd -v
|
||||||
|
|
|
@ -8,7 +8,7 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||||
# The version number.
|
# The version number.
|
||||||
set(VERSION_MAJOR 0)
|
set(VERSION_MAJOR 0)
|
||||||
set(VERSION_MINOR 5)
|
set(VERSION_MINOR 5)
|
||||||
set(VERSION_PATCH 1)
|
set(VERSION_PATCH 2)
|
||||||
|
|
||||||
if (DEFINED VERBOSE)
|
if (DEFINED VERBOSE)
|
||||||
set(VERBOSE ${VERBOSE})
|
set(VERBOSE ${VERBOSE})
|
||||||
|
@ -31,7 +31,7 @@ elseif (WIN32)
|
||||||
set(ZOPFLI_DEFAULT_PATH C:\\zopfli)
|
set(ZOPFLI_DEFAULT_PATH C:\\zopfli)
|
||||||
else ()
|
else ()
|
||||||
set(MOZJPEG_DEFAULT_PATH /opt/mozjpeg)
|
set(MOZJPEG_DEFAULT_PATH /opt/mozjpeg)
|
||||||
set(ZOPFLI_DEFAULT_PATH /usr)
|
set(ZOPFLI_DEFAULT_PATH /usr/local)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,11 +6,12 @@ endif ()
|
||||||
|
|
||||||
find_library(jpeg jpeg ${MOZJPEG_PATH}/lib)
|
find_library(jpeg jpeg ${MOZJPEG_PATH}/lib)
|
||||||
find_library(turbojpeg turbojpeg ${MOZJPEG_PATH}/lib)
|
find_library(turbojpeg turbojpeg ${MOZJPEG_PATH}/lib)
|
||||||
|
find_library(zopfli zopfli ${ZOPFLI_PATH}/lib)
|
||||||
find_library(zopflipng zopflipng ${ZOPFLI_PATH}/lib)
|
find_library(zopflipng zopflipng ${ZOPFLI_PATH}/lib)
|
||||||
|
|
||||||
add_library(caesium SHARED caesium.c error.c utils.c png.c vendor/lodepng.c jpeg.c)
|
add_library(caesium SHARED caesium.c error.c utils.c png.c vendor/lodepng.c jpeg.c)
|
||||||
|
|
||||||
target_link_libraries(caesium jpeg turbojpeg zopflipng)
|
target_link_libraries(caesium jpeg turbojpeg zopfli zopflipng)
|
||||||
|
|
||||||
# Make sure the compiler can find include files for our Caesium library
|
# Make sure the compiler can find include files for our Caesium library
|
||||||
# when other libraries or executables link to Caesium
|
# when other libraries or executables link to Caesium
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
#include "../caesium/caesium.h"
|
#include "../caesium/caesium.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
fprintf(stdout, "libcaesium demo application v%d.%d.%d\n",
|
if (argc == 2 && strcmp(argv[1], "-v") == 0) {
|
||||||
VERSION_MAJOR,
|
fprintf(stdout, "%d.%d.%d\n", VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH);
|
||||||
VERSION_MINOR,
|
exit(EXIT_SUCCESS);
|
||||||
VERSION_PATCH);
|
}
|
||||||
|
|
||||||
if (argc != 3) {
|
if (argc != 3) {
|
||||||
fprintf(stderr, "Wrong arguments.\nExiting.\n");
|
fprintf(stderr, "Wrong arguments.\nExiting.\n");
|
||||||
|
|
Loading…
Reference in New Issue