From 3047bb25982e5242f535b12997bf529b00330d20 Mon Sep 17 00:00:00 2001 From: roentgen Date: Mar 25 2016 09:42:18 +0000 Subject: we always have thirdparty/lzo/driver. osx build never uses thirdpary/lzo/lzo-2.09 (was removed) --- diff --git a/thirdparty/lzo/driver/CMakeLists.txt b/thirdparty/lzo/driver/CMakeLists.txt index 731c2c2..040d00c 100644 --- a/thirdparty/lzo/driver/CMakeLists.txt +++ b/thirdparty/lzo/driver/CMakeLists.txt @@ -8,13 +8,12 @@ if (WIN32) set(PREFIX _64) endif (CMAKE_SIZEOF_VOID_P EQUAL 8) else () - get_filename_component(LZO_PATH ${SDKROOT}/lzo/lzo-2.09 ABSOLUTE) - link_directories(${LZO_PATH}/src/.libs/) + set(LZO_PATH ${LZO_INCLUDE_DIR}) endif () include_directories(${LZO_PATH} ${LZO_PATH}/include) add_definitions(-DLZO_USE_ASM) add_executable(lzocompress lzocompress.c) -target_link_libraries(lzocompress lzo2${PREFIX}) +target_link_libraries(lzocompress lzo2${PREFIX} ${LZO_LIBRARY}) add_executable(lzodecompress lzodecompress.c) -target_link_libraries(lzodecompress lzo2${PREFIX}) +target_link_libraries(lzodecompress lzo2${PREFIX} ${LZO_LIBRARY}) diff --git a/thirdparty/lzo/driver/lzocompress.c b/thirdparty/lzo/driver/lzocompress.c index b7a76bd..aaac821 100644 --- a/thirdparty/lzo/driver/lzocompress.c +++ b/thirdparty/lzo/driver/lzocompress.c @@ -10,7 +10,7 @@ /* portability layer */ #define WANT_LZO_MALLOC 1 -#include "examples/portab.h" +#include "lzo/lzoutil.h" #include diff --git a/thirdparty/lzo/driver/lzodecompress.c b/thirdparty/lzo/driver/lzodecompress.c index 2222d2b..1176a05 100644 --- a/thirdparty/lzo/driver/lzodecompress.c +++ b/thirdparty/lzo/driver/lzodecompress.c @@ -13,8 +13,7 @@ /* portability layer */ #define WANT_LZO_MALLOC 1 -#include "examples/portab.h" - +#include "lzo/lzoutil.h" #include #include diff --git a/toonz/cmake/FindLZO.cmake b/toonz/cmake/FindLZO.cmake index 1f4b82d..ea30cc2 100644 --- a/toonz/cmake/FindLZO.cmake +++ b/toonz/cmake/FindLZO.cmake @@ -1,5 +1,5 @@ -find_path(LZO_INCLUDE_DIR NAMES lzoconf.h HINTS ${THIRDPARTY_LIBS_HINTS} PATH_SUFFIXES lzo/2.09/include/lzo) -find_library(LZO_LIBRARY NAMES liblzo2.a HINTS ${THIRDPARTY_LIBS_HINTS} PATH_SUFFIXES lzo/2.09/lib) +find_path(LZO_INCLUDE_DIR NAMES lzoconf.h HINTS ${THIRDPARTY_LIBS_HINTS} PATH_SUFFIXES lzo/2.09/include/lzo lzo/2.03/include/lzo) +find_library(LZO_LIBRARY NAMES liblzo2.a lzo2_64.lib HINTS ${THIRDPARTY_LIBS_HINTS} PATH_SUFFIXES lzo/2.09/lib lzo/2.03/lib/LZO_lib) message("***** LZO Header path:" ${LZO_INCLUDE_DIR}) message("***** LZO Libarary path:" ${LZO_LIBRARY}) @@ -7,12 +7,10 @@ message("***** LZO Libarary path:" ${LZO_LIBRARY}) set(LZO_NAMES ${LZO_NAMES} LZO) include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(SuperLU DEFAULT_MSG LZO_LIBRARY LZO_INCLUDE_DIR) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO DEFAULT_MSG LZO_LIBRARY LZO_INCLUDE_DIR) if(LZO_FOUND) set(LZO_LIBRARIES ${LZO_LIBRARY}) endif() mark_as_advanced(LZO_LIBRARY LZO_INCLUDE_DIR) - - diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txt index 74c956d..66e30bd 100644 --- a/toonz/sources/CMakeLists.txt +++ b/toonz/sources/CMakeLists.txt @@ -154,9 +154,6 @@ else() set(SUPERLU_LIB ${SUPERLU_LIBRARY}) message("SuperLU:" ${SUPERLU_INCLUDE_DIR}) - find_package(LZO REQUIRED) - message("LZO:" ${LZO_INCLUDE_DIR}) - find_package(JPEG REQUIRED) # the libraries have .pc @@ -182,6 +179,9 @@ else() set(JPEG_LIB ${JPEG_LIBRARY}) set(LZ4_LIB ${LZ4_LIB_LDFLAGS}) + + find_package(LZO REQUIRED) + message("LZO:" ${LZO_INCLUDE_DIR}) endif() find_path(BOOST_ROOT include/boost boost HINTS ${THIRDPARTY_LIBS_HINTS} PATH_SUFFIXES boost155/1.55.0_1 boost/boost_1_55_0/) @@ -231,11 +231,7 @@ add_subdirectory(toonzqt) add_subdirectory(tnztools) add_subdirectory(toonz) -find_path(LZODRIVER lzodriver HINTS ${THIRDPARTY_LIBS_HINTS}) -if(LZODRIVER-FOUND) - set(LZODRIVER-FOUND true) - add_subdirectory(${SDKROOT}/lzo/driver lzodriver) -endif() +add_subdirectory(${SDKROOT}/lzo/driver lzodriver) add_subdirectory(tcleanupper) add_subdirectory(tcomposer)