Remove obsolete and unmaintained USE_SYSTEMLIBS

master
Nicky 2022-04-13 10:28:46 +02:00
parent 07d388f416
commit d3521b4462
50 changed files with 304 additions and 1090 deletions

View File

@ -139,12 +139,10 @@ if (LINUX)
add_compile_options(-march=pentium4)
endif (ADDRESS_SIZE EQUAL 32)
if (NOT USESYSTEMLIBS)
# this stops us requiring a really recent glibc at runtime
add_compile_options(-fno-stack-protector)
# linking can be very memory-hungry, especially the final viewer link
set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory")
endif (NOT USESYSTEMLIBS)
# this stops us requiring a really recent glibc at runtime
add_compile_options(-fno-stack-protector)
# linking can be very memory-hungry, especially the final viewer link
set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory")
set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}")
endif (LINUX)
@ -194,21 +192,12 @@ if (LINUX OR DARWIN)
endif (LINUX OR DARWIN)
if (USESYSTEMLIBS)
add_definitions(-DLL_USESYSTEMLIBS=1)
if (LINUX AND ADDRESS_SIZE EQUAL 32)
add_compile_options(-march=pentiumpro)
endif (LINUX AND ADDRESS_SIZE EQUAL 32)
else (USESYSTEMLIBS)
set(${ARCH}_linux_INCLUDES
atk-1.0
glib-2.0
gstreamer-0.10
gtk-2.0
pango-1.0
)
endif (USESYSTEMLIBS)
set(${ARCH}_linux_INCLUDES
atk-1.0
glib-2.0
gstreamer-0.10
gtk-2.0
pango-1.0
)
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)

View File

@ -7,43 +7,39 @@ endif()
create_target( apr::apr)
if (USESYSTEMLIBS)
include(FindAPR)
else (USESYSTEMLIBS)
use_prebuilt_binary(apr_suite)
if (WINDOWS)
if (LLCOMMON_LINK_SHARED)
set(APR_selector "lib")
else (LLCOMMON_LINK_SHARED)
set(APR_selector "")
endif (LLCOMMON_LINK_SHARED)
set_target_libraries( apr::apr
${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib
${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apriconv-1.lib
${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib
)
elseif (DARWIN)
if (LLCOMMON_LINK_SHARED)
set(APR_selector "0.dylib")
set(APRUTIL_selector "0.dylib")
else (LLCOMMON_LINK_SHARED)
set(APR_selector "a")
set(APRUTIL_selector "a")
endif (LLCOMMON_LINK_SHARED)
use_prebuilt_binary(apr_suite)
if (WINDOWS)
if (LLCOMMON_LINK_SHARED)
set(APR_selector "lib")
else (LLCOMMON_LINK_SHARED)
set(APR_selector "")
endif (LLCOMMON_LINK_SHARED)
set_target_libraries( apr::apr
${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib
${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apriconv-1.lib
${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib
)
elseif (DARWIN)
if (LLCOMMON_LINK_SHARED)
set(APR_selector "0.dylib")
set(APRUTIL_selector "0.dylib")
else (LLCOMMON_LINK_SHARED)
set(APR_selector "a")
set(APRUTIL_selector "a")
endif (LLCOMMON_LINK_SHARED)
set_target_libraries( apr::apr
libapr-1.${APR_selector}
libaprutil-1.${APRUTIL_selector}
iconv
)
else (WINDOWS)
set_target_libraries( apr::apr
apr-1
aprutil-1
iconv
uuid
rt
)
endif (WINDOWS)
set_target_include_dirs( apr::apr ${LIBS_PREBUILT_DIR}/include/apr-1 )
endif (USESYSTEMLIBS)
set_target_libraries( apr::apr
libapr-1.${APR_selector}
libaprutil-1.${APRUTIL_selector}
iconv
)
else (WINDOWS)
set_target_libraries( apr::apr
apr-1
aprutil-1
iconv
uuid
rt
)
endif (WINDOWS)
set_target_include_dirs( apr::apr ${LIBS_PREBUILT_DIR}/include/apr-1 )

View File

@ -6,20 +6,12 @@ if(TARGET vorbis::vorbis)
endif()
create_target(vorbis::vorbis)
if (USESYSTEMLIBS)
include(FindPkgConfig)
pkg_check_modules(OGG REQUIRED ogg)
pkg_check_modules(VORBIS REQUIRED vorbis)
pkg_check_modules(VORBISENC REQUIRED vorbisenc)
pkg_check_modules(VORBISFILE REQUIRED vorbisfile)
else (USESYSTEMLIBS)
use_prebuilt_binary(ogg_vorbis)
set_target_include_dirs( vorbis::vorbis ${LIBS_PREBUILT_DIR}/include )
use_prebuilt_binary(ogg_vorbis)
set_target_include_dirs( vorbis::vorbis ${LIBS_PREBUILT_DIR}/include )
if (WINDOWS)
set_target_libraries(vorbis::vorbis ogg_static vorbis_static vorbisenc_static vorbisfile_static )
else (WINDOWS)
set_target_libraries(vorbis::vorbis ogg vorbis vorbisenc vorbisfile )
endif (WINDOWS)
endif (USESYSTEMLIBS)
if (WINDOWS)
set_target_libraries(vorbis::vorbis ogg_static vorbis_static vorbisenc_static vorbisfile_static )
else (WINDOWS)
set_target_libraries(vorbis::vorbis ogg vorbis vorbisenc vorbisfile )
endif (WINDOWS)

View File

@ -9,55 +9,42 @@ create_target( boost::boost )
set(Boost_FIND_QUIETLY ON)
set(Boost_FIND_REQUIRED ON)
if (USESYSTEMLIBS)
include(FindBoost)
use_prebuilt_binary(boost)
set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
set(BOOST_CONTEXT_LIBRARY boost_context-mt)
set(BOOST_FIBER_LIBRARY boost_fiber-mt)
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
set(BOOST_REGEX_LIBRARY boost_regex-mt)
set(BOOST_SIGNALS_LIBRARY boost_signals-mt)
set(BOOST_SYSTEM_LIBRARY boost_system-mt)
set(BOOST_THREAD_LIBRARY boost_thread-mt)
else (USESYSTEMLIBS)
use_prebuilt_binary(boost)
set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
# As of sometime between Boost 1.67 and 1.72, Boost libraries are suffixed
# with the address size.
set(addrsfx "-x${ADDRESS_SIZE}")
# As of sometime between Boost 1.67 and 1.72, Boost libraries are suffixed
# with the address size.
set(addrsfx "-x${ADDRESS_SIZE}")
if (WINDOWS)
set_target_libraries( boost::boost
libboost_context-mt${addrsfx}
libboost_fiber-mt${addrsfx}
libboost_filesystem-mt${addrsfx}
libboost_program_options-mt${addrsfx}
libboost_regex-mt${addrsfx}
libboost_system-mt${addrsfx}
libboost_thread-mt${addrsfx})
elseif (LINUX)
set_target_libraries( boost::boost
boost_context-mt${addrsfx}
boost_fiber-mt${addrsfx}
boost_filesystem-mt${addrsfx}
boost_program_options-mt${addrsfx}
boost_regex-mt${addrsfx}
boost_signals-mt${addrsfx}
boost_system-mt${addrsfx}
boost_thread-mt${addrsfx})
elseif (DARWIN)
set_target_libraries( boost::boost
boost_context-mt${addrsfx}
boost_fiber-mt${addrsfx}
boost_filesystem-mt${addrsfx}
boost_program_options-mt${addrsfx}
boost_regex-mt${addrsfx}
boost_system-mt${addrsfx}
boost_thread-mt${addrsfx})
endif (WINDOWS)
endif (USESYSTEMLIBS)
if (WINDOWS)
set_target_libraries( boost::boost
libboost_context-mt${addrsfx}
libboost_fiber-mt${addrsfx}
libboost_filesystem-mt${addrsfx}
libboost_program_options-mt${addrsfx}
libboost_regex-mt${addrsfx}
libboost_system-mt${addrsfx}
libboost_thread-mt${addrsfx})
elseif (LINUX)
set_target_libraries( boost::boost
boost_context-mt${addrsfx}
boost_fiber-mt${addrsfx}
boost_filesystem-mt${addrsfx}
boost_program_options-mt${addrsfx}
boost_regex-mt${addrsfx}
boost_signals-mt${addrsfx}
boost_system-mt${addrsfx}
boost_thread-mt${addrsfx})
elseif (DARWIN)
set_target_libraries( boost::boost
boost_context-mt${addrsfx}
boost_fiber-mt${addrsfx}
boost_filesystem-mt${addrsfx}
boost_program_options-mt${addrsfx}
boost_regex-mt${addrsfx}
boost_system-mt${addrsfx}
boost_thread-mt${addrsfx})
endif (WINDOWS)
if (LINUX)
set(BOOST_SYSTEM_LIBRARY ${BOOST_SYSTEM_LIBRARY} rt)

View File

@ -7,13 +7,8 @@ if(TARGET cef::cef)
endif()
create_target( cef::cef )
if (USESYSTEMLIBS)
set(CEFPLUGIN OFF CACHE BOOL
"CEFPLUGIN support for the llplugin/llmedia test apps.")
else (USESYSTEMLIBS)
use_prebuilt_binary(dullahan)
set_target_include_dirs( cef::cef ${LIBS_PREBUILT_DIR}/include/cef)
endif (USESYSTEMLIBS)
use_prebuilt_binary(dullahan)
set_target_include_dirs( cef::cef ${LIBS_PREBUILT_DIR}/include/cef)
if (WINDOWS)
set_target_libraries( cef::cef

View File

@ -23,18 +23,8 @@ set(cmake_SOURCE_FILES
DeploySharedLibs.cmake
DragDrop.cmake
EXPAT.cmake
FindAPR.cmake
FindAutobuild.cmake
FindGLH.cmake
FindHUNSPELL.cmake
FindJsonCpp.cmake
FindNDOF.cmake
FindOpenJPEG.cmake
FindSCP.cmake
FindURIPARSER.cmake
FindXmlRpcEpi.cmake
FindZLIBNG.cmake
FMODSTUDIO.cmake
FindAutobuild.cmake
FMODSTUDIO.cmake
FreeType.cmake
GLEXT.cmake
GLH.cmake

View File

@ -6,14 +6,10 @@ if( TARGET libcurl::libcurl )
endif()
create_target(libcurl::libcurl)
if (USESYSTEMLIBS)
include(FindCURL)
else (USESYSTEMLIBS)
use_prebuilt_binary(curl)
if (WINDOWS)
set_target_libraries(libcurl::libcurl libcurl.lib)
else (WINDOWS)
set_target_libraries(libcurl::libcurl libcurl.a)
endif (WINDOWS)
set_target_include_dirs( libcurl::libcurl ${LIBS_PREBUILT_DIR}/include)
endif (USESYSTEMLIBS)
use_prebuilt_binary(curl)
if (WINDOWS)
set_target_libraries(libcurl::libcurl libcurl.lib)
else (WINDOWS)
set_target_libraries(libcurl::libcurl libcurl.a)
endif (WINDOWS)
set_target_include_dirs( libcurl::libcurl ${LIBS_PREBUILT_DIR}/include)

View File

@ -280,9 +280,7 @@ to_staging_dirs(
${release_files}
)
if(NOT USESYSTEMLIBS)
add_custom_target(
stage_third_party_libs ALL
DEPENDS ${third_party_targets}
)
endif(NOT USESYSTEMLIBS)
add_custom_target(
stage_third_party_libs ALL
DEPENDS ${third_party_targets}
)

View File

@ -1,24 +1,17 @@
# -*- cmake -*-
include(Prebuilt)
if (USESYSTEMLIBS)
include(FindPkgConfig)
pkg_check_modules(DBUSGLIB REQUIRED dbus-glib-1)
elseif (LINUX)
use_prebuilt_binary(dbus_glib)
set(DBUSGLIB_FOUND ON FORCE BOOL)
set(DBUSGLIB_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include/dbus
)
# We don't need to explicitly link against dbus-glib itself, because
# the viewer probes for the system's copy at runtime.
set(DBUSGLIB_LIBRARIES
gobject-2.0
glib-2.0
)
endif (USESYSTEMLIBS)
use_prebuilt_binary(dbus_glib)
set(DBUSGLIB_FOUND ON FORCE BOOL)
set(DBUSGLIB_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include/dbus
)
# We don't need to explicitly link against dbus-glib itself, because
# the viewer probes for the system's copy at runtime.
set(DBUSGLIB_LIBRARIES
gobject-2.0
glib-2.0
)
if (DBUSGLIB_FOUND)
set(DBUSGLIB ON CACHE BOOL "Build with dbus-glib message bus support.")

View File

@ -1,20 +1,16 @@
# -*- cmake -*-
set(OS_DRAG_DROP ON CACHE BOOL "Build the viewer with OS level drag and drop turned on or off")
if (OS_DRAG_DROP)
set(OS_DRAG_DROP ON CACHE BOOL "Build the viewer with OS level drag and drop turned on or off")
if (OS_DRAG_DROP)
if (WINDOWS)
add_definitions(-DLL_OS_DRAGDROP_ENABLED=1)
add_definitions(-DLL_OS_DRAGDROP_ENABLED=1)
endif (WINDOWS)
if (DARWIN)
add_definitions(-DLL_OS_DRAGDROP_ENABLED=1)
add_definitions(-DLL_OS_DRAGDROP_ENABLED=1)
endif (DARWIN)
if (LINUX)
add_definitions(-DLL_OS_DRAGDROP_ENABLED=0)
add_definitions(-DLL_OS_DRAGDROP_ENABLED=0)
endif (LINUX)
endif (OS_DRAG_DROP)
endif (OS_DRAG_DROP)

View File

@ -6,20 +6,16 @@ if( TARGET expat::expat )
endif()
create_target( expat::expat INTERFACE IMPORTED )
if (USESYSTEMLIBS)
include(FindEXPAT)
else (USESYSTEMLIBS)
use_prebuilt_binary(expat)
if (WINDOWS)
set_target_libraries( expat::expat libexpatMT )
set(EXPAT_COPY libexpatMT.dll)
else (WINDOWS)
set_target_libraries( expat::expat expat )
if (DARWIN)
set(EXPAT_COPY libexpat.1.dylib libexpat.dylib)
else ()
set(EXPAT_COPY libexpat.so.1 libexpat.so)
endif ()
endif (WINDOWS)
set_target_include_dirs( expat::expat ${LIBS_PREBUILT_DIR}/include )
endif (USESYSTEMLIBS)
use_prebuilt_binary(expat)
if (WINDOWS)
set_target_libraries( expat::expat libexpatMT )
set(EXPAT_COPY libexpatMT.dll)
else (WINDOWS)
set_target_libraries( expat::expat expat )
if (DARWIN)
set(EXPAT_COPY libexpat.1.dylib libexpat.dylib)
else ()
set(EXPAT_COPY libexpat.so.1 libexpat.so)
endif ()
endif (WINDOWS)
set_target_include_dirs( expat::expat ${LIBS_PREBUILT_DIR}/include )

View File

@ -2,13 +2,8 @@
include(Linking)
include(Prebuilt)
if (USESYSTEMLIBS)
set(EXAMPLEPLUGIN OFF CACHE BOOL
set(EXAMPLEPLUGIN ON CACHE BOOL
"EXAMPLEPLUGIN support for the llplugin/llmedia test apps.")
else (USESYSTEMLIBS)
set(EXAMPLEPLUGIN ON CACHE BOOL
"EXAMPLEPLUGIN support for the llplugin/llmedia test apps.")
endif (USESYSTEMLIBS)
if (WINDOWS)
elseif (DARWIN)

View File

@ -1,94 +0,0 @@
# -*- cmake -*-
# - Find Apache Portable Runtime
# Find the APR includes and libraries
# This module defines
# APR_INCLUDE_DIR and APRUTIL_INCLUDE_DIR, where to find apr.h, etc.
# APR_LIBRARIES and APRUTIL_LIBRARIES, the libraries needed to use APR.
# APR_FOUND and APRUTIL_FOUND, If false, do not try to use APR.
# also defined, but not for general use are
# APR_LIBRARY and APRUTIL_LIBRARY, where to find the APR library.
# APR first.
FIND_PATH(APR_INCLUDE_DIR apr.h
/usr/local/include/apr-1
/usr/local/include/apr-1.0
/usr/include/apr-1
/usr/include/apr-1.0
)
SET(APR_NAMES ${APR_NAMES} apr-1)
FIND_LIBRARY(APR_LIBRARY
NAMES ${APR_NAMES}
PATHS /usr/lib /usr/local/lib
)
IF (APR_LIBRARY AND APR_INCLUDE_DIR)
SET(APR_LIBRARIES ${APR_LIBRARY})
SET(APR_FOUND "YES")
ELSE (APR_LIBRARY AND APR_INCLUDE_DIR)
SET(APR_FOUND "NO")
ENDIF (APR_LIBRARY AND APR_INCLUDE_DIR)
IF (APR_FOUND)
IF (NOT APR_FIND_QUIETLY)
MESSAGE(STATUS "Found APR: ${APR_LIBRARIES}")
ENDIF (NOT APR_FIND_QUIETLY)
ELSE (APR_FOUND)
IF (APR_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find APR library")
ENDIF (APR_FIND_REQUIRED)
ENDIF (APR_FOUND)
# Deprecated declarations.
SET (NATIVE_APR_INCLUDE_PATH ${APR_INCLUDE_DIR} )
GET_FILENAME_COMPONENT (NATIVE_APR_LIB_PATH ${APR_LIBRARY} PATH)
MARK_AS_ADVANCED(
APR_LIBRARY
APR_INCLUDE_DIR
)
# Next, APRUTIL.
FIND_PATH(APRUTIL_INCLUDE_DIR apu.h
/usr/local/include/apr-1
/usr/local/include/apr-1.0
/usr/include/apr-1
/usr/include/apr-1.0
)
SET(APRUTIL_NAMES ${APRUTIL_NAMES} aprutil-1)
FIND_LIBRARY(APRUTIL_LIBRARY
NAMES ${APRUTIL_NAMES}
PATHS /usr/lib /usr/local/lib
)
IF (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR)
SET(APRUTIL_LIBRARIES ${APRUTIL_LIBRARY})
SET(APRUTIL_FOUND "YES")
ELSE (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR)
SET(APRUTIL_FOUND "NO")
ENDIF (APRUTIL_LIBRARY AND APRUTIL_INCLUDE_DIR)
IF (APRUTIL_FOUND)
IF (NOT APRUTIL_FIND_QUIETLY)
MESSAGE(STATUS "Found APRUTIL: ${APRUTIL_LIBRARIES}")
ENDIF (NOT APRUTIL_FIND_QUIETLY)
ELSE (APRUTIL_FOUND)
IF (APRUTIL_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find APRUTIL library")
ENDIF (APRUTIL_FIND_REQUIRED)
ENDIF (APRUTIL_FOUND)
# Deprecated declarations.
SET (NATIVE_APRUTIL_INCLUDE_PATH ${APRUTIL_INCLUDE_DIR} )
GET_FILENAME_COMPONENT (NATIVE_APRUTIL_LIB_PATH ${APRUTIL_LIBRARY} PATH)
MARK_AS_ADVANCED(
APRUTIL_LIBRARY
APRUTIL_INCLUDE_DIR
)

View File

@ -1,30 +0,0 @@
# -*- cmake -*-
# - Find GLH
# Find the Graphic Library Helper includes.
# This module defines
# GLH_INCLUDE_DIR, where to find glh/glh_linear.h.
# GLH_FOUND, If false, do not try to use GLH.
find_path(GLH_INCLUDE_DIR glh/glh_linear.h
NO_SYSTEM_ENVIRONMENT_PATH
)
if (GLH_INCLUDE_DIR)
set(GLH_FOUND "YES")
else (GLH_INCLUDE_DIR)
set(GLH_FOUND "NO")
endif (GLH_INCLUDE_DIR)
if (GLH_FOUND)
if (NOT GLH_FIND_QUIETLY)
message(STATUS "Found GLH: ${GLH_INCLUDE_DIR}")
set(GLH_FIND_QUIETLY TRUE) # Only alert us the first time
endif (NOT GLH_FIND_QUIETLY)
else (GLH_FOUND)
if (GLH_FIND_REQUIRED)
message(FATAL_ERROR "Could not find GLH")
endif (GLH_FIND_REQUIRED)
endif (GLH_FOUND)
mark_as_advanced(GLH_INCLUDE_DIR)

View File

@ -1,66 +0,0 @@
# -*- cmake -*-
# - Find Google perftools
# Find the Google perftools includes and libraries
# This module defines
# GOOGLE_PERFTOOLS_INCLUDE_DIR, where to find heap-profiler.h, etc.
# GOOGLE_PERFTOOLS_FOUND, If false, do not try to use Google perftools.
# also defined for general use are
# TCMALLOC_LIBRARIES, where to find the tcmalloc library.
# STACKTRACE_LIBRARIES, where to find the stacktrace library.
# PROFILER_LIBRARIES, where to find the profiler library.
FIND_PATH(GOOGLE_PERFTOOLS_INCLUDE_DIR google/heap-profiler.h
/usr/local/include
/usr/include
)
SET(TCMALLOC_NAMES ${TCMALLOC_NAMES} tcmalloc)
FIND_LIBRARY(TCMALLOC_LIBRARY
NAMES ${TCMALLOC_NAMES}
PATHS /usr/lib /usr/local/lib
)
IF (TCMALLOC_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR)
SET(TCMALLOC_LIBRARIES ${TCMALLOC_LIBRARY})
SET(GOOGLE_PERFTOOLS_FOUND "YES")
ELSE (TCMALLOC_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR)
SET(GOOGLE_PERFTOOLS_FOUND "NO")
ENDIF (TCMALLOC_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR)
SET(STACKTRACE_NAMES ${STACKTRACE_NAMES} stacktrace)
FIND_LIBRARY(STACKTRACE_LIBRARY
NAMES ${STACKTRACE_LIBRARY}
PATHS /usr/lib /usr/local/lib
)
IF (STACKTRACE_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR)
SET(STACKTRACE_LIBRARIES ${STACKTRACE_LIBRARY})
ENDIF (STACKTRACE_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR)
SET(PROFILER_NAMES ${PROFILER_NAMES} profiler)
FIND_LIBRARY(PROFILER_LIBRARY
NAMES ${PROFILER_LIBRARY}
PATHS /usr/lib /usr/local/lib
)
IF (PROFILER_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR)
SET(PROFILER_LIBRARIES ${PROFILER_LIBRARY})
ENDIF (PROFILER_LIBRARY AND GOOGLE_PERFTOOLS_INCLUDE_DIR)
IF (GOOGLE_PERFTOOLS_FOUND)
IF (NOT GOOGLE_PERFTOOLS_FIND_QUIETLY)
MESSAGE(STATUS "Found Google perftools: ${GOOGLE_PERFTOOLS_LIBRARIES}")
ENDIF (NOT GOOGLE_PERFTOOLS_FIND_QUIETLY)
ELSE (GOOGLE_PERFTOOLS_FOUND)
IF (GOOGLE_PERFTOOLS_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Google perftools library")
ENDIF (GOOGLE_PERFTOOLS_FIND_REQUIRED)
ENDIF (GOOGLE_PERFTOOLS_FOUND)
MARK_AS_ADVANCED(
TCMALLOC_LIBRARY
STACKTRACE_LIBRARY
PROFILER_LIBRARY
GOOGLE_PERFTOOLS_INCLUDE_DIR
)

View File

@ -1,38 +0,0 @@
# -*- cmake -*-
# - Find HUNSPELL
# This module defines
# HUNSPELL_INCLUDE_DIR, where to find libhunspell.h, etc.
# HUNSPELL_LIBRARY, the library needed to use HUNSPELL.
# HUNSPELL_FOUND, If false, do not try to use HUNSPELL.
find_path(HUNSPELL_INCLUDE_DIR hunspell.h
PATH_SUFFIXES hunspell
)
set(HUNSPELL_NAMES ${HUNSPELL_NAMES} libhunspell-1.3 libhunspell)
find_library(HUNSPELL_LIBRARY
NAMES ${HUNSPELL_NAMES}
)
if (HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
set(HUNSPELL_FOUND "YES")
else (HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
set(HUNSPELL_FOUND "NO")
endif (HUNSPELL_LIBRARY AND HUNSPELL_INCLUDE_DIR)
if (HUNSPELL_FOUND)
if (NOT HUNSPELL_FIND_QUIETLY)
message(STATUS "Found Hunspell: Library in '${HUNSPELL_LIBRARY}' and header in '${HUNSPELL_INCLUDE_DIR}' ")
endif (NOT HUNSPELL_FIND_QUIETLY)
else (HUNSPELL_FOUND)
if (HUNSPELL_FIND_REQUIRED)
message(FATAL_ERROR " * * *\nCould not find HUNSPELL library! * * *")
endif (HUNSPELL_FIND_REQUIRED)
endif (HUNSPELL_FOUND)
mark_as_advanced(
HUNSPELL_LIBRARY
HUNSPELL_INCLUDE_DIR
)

View File

@ -1,60 +0,0 @@
# -*- cmake -*-
# - Find JSONCpp
# Find the JSONCpp includes and library
# This module defines
# JSONCPP_INCLUDE_DIR, where to find json.h, etc.
# JSONCPP_LIBRARIES, the libraries needed to use jsoncpp.
# JSONCPP_FOUND, If false, do not try to use jsoncpp.
# also defined, but not for general use are
# JSONCPP_LIBRARY, where to find the jsoncpp library.
FIND_PATH(JSONCPP_INCLUDE_DIR jsoncpp/json.h
/usr/local/include
/usr/include
)
# Get the GCC compiler version
EXEC_PROGRAM(${CMAKE_CXX_COMPILER}
ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
OUTPUT_VARIABLE _gcc_COMPILER_VERSION
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)
IF (USESYSTEMLIBS)
# On standalone, assume that the system installed library was compiled with the used compiler.
SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson.so)
ENDIF (USESYSTEMLIBS)
FIND_LIBRARY(JSONCPP_LIBRARY
NAMES ${JSONCPP_NAMES}
PATHS /usr/lib /usr/local/lib
)
IF (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
SET(JSONCPP_LIBRARIES ${JSONCPP_LIBRARY})
SET(JSONCPP_FOUND "YES")
ELSE (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
SET(JSONCPP_FOUND "NO")
ENDIF (JSONCPP_LIBRARY AND JSONCPP_INCLUDE_DIR)
IF (JSONCPP_FOUND)
IF (NOT JSONCPP_FIND_QUIETLY)
MESSAGE(STATUS "Found JSONCpp: ${JSONCPP_LIBRARIES}")
ENDIF (NOT JSONCPP_FIND_QUIETLY)
ELSE (JSONCPP_FOUND)
IF (JSONCPP_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find JSONCpp library")
ENDIF (JSONCPP_FIND_REQUIRED)
ENDIF (JSONCPP_FOUND)
# Deprecated declarations.
SET (NATIVE_JSONCPP_INCLUDE_PATH ${JSONCPP_INCLUDE_DIR} )
GET_FILENAME_COMPONENT (NATIVE_JSONCPP_LIB_PATH ${JSONCPP_LIBRARY} PATH)
MARK_AS_ADVANCED(
JSONCPP_LIBRARY
JSONCPP_INCLUDE_DIR
)

View File

@ -1,39 +0,0 @@
# -*- cmake -*-
# - Find NDOF
# Find the NDOF includes and library
# This module defines
# NDOF_INCLUDE_DIR, where to find ndofdev_external.h, etc.
# NDOF_LIBRARY, the library needed to use NDOF.
# NDOF_FOUND, If false, do not try to use NDOF.
find_path(NDOF_INCLUDE_DIR ndofdev_external.h
PATH_SUFFIXES ndofdev
)
set(NDOF_NAMES ${NDOF_NAMES} ndofdev libndofdev)
find_library(NDOF_LIBRARY
NAMES ${NDOF_NAMES}
)
if (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
set(NDOF_FOUND "YES")
else (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
set(NDOF_FOUND "NO")
endif (NDOF_LIBRARY AND NDOF_INCLUDE_DIR)
if (NDOF_FOUND)
if (NOT NDOF_FIND_QUIETLY)
message(STATUS "Found NDOF: Library in '${NDOF_LIBRARY}' and header in '${NDOF_INCLUDE_DIR}' ")
endif (NOT NDOF_FIND_QUIETLY)
else (NDOF_FOUND)
if (NDOF_FIND_REQUIRED)
message(FATAL_ERROR " * * *\nCould not find NDOF library!\nIf you don't need Space Navigator Joystick support you can skip this test by configuring with -DNDOF:BOOL=OFF\n * * *")
endif (NDOF_FIND_REQUIRED)
endif (NDOF_FOUND)
mark_as_advanced(
NDOF_LIBRARY
NDOF_INCLUDE_DIR
)

View File

@ -1,50 +0,0 @@
# -*- cmake -*-
# - Find OpenJPEG
# Find the OpenJPEG includes and library
# This module defines
# OPENJPEG_INCLUDE_DIR, where to find openjpeg.h, etc.
# OPENJPEG_LIBRARIES, the libraries needed to use OpenJPEG.
# OPENJPEG_FOUND, If false, do not try to use OpenJPEG.
# also defined, but not for general use are
# OPENJPEG_LIBRARY, where to find the OpenJPEG library.
FIND_PATH(OPENJPEG_INCLUDE_DIR openjpeg.h
/usr/local/include/openjpeg
/usr/local/include
/usr/include/openjpeg
/usr/include
)
SET(OPENJPEG_NAMES ${OPENJPEG_NAMES} openjpeg)
FIND_LIBRARY(OPENJPEG_LIBRARY
NAMES ${OPENJPEG_NAMES}
PATHS /usr/lib /usr/local/lib
)
IF (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR)
SET(OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARY})
SET(OPENJPEG_FOUND "YES")
ELSE (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR)
SET(OPENJPEG_FOUND "NO")
ENDIF (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR)
IF (OPENJPEG_FOUND)
IF (NOT OPENJPEG_FIND_QUIETLY)
MESSAGE(STATUS "Found OpenJPEG: ${OPENJPEG_LIBRARIES}")
ENDIF (NOT OPENJPEG_FIND_QUIETLY)
ELSE (OPENJPEG_FOUND)
IF (OPENJPEG_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find OpenJPEG library")
ENDIF (OPENJPEG_FIND_REQUIRED)
ENDIF (OPENJPEG_FOUND)
# Deprecated declarations.
SET (NATIVE_OPENJPEG_INCLUDE_PATH ${OPENJPEG_INCLUDE_DIR} )
GET_FILENAME_COMPONENT (NATIVE_OPENJPEG_LIB_PATH ${OPENJPEG_LIBRARY} PATH)
MARK_AS_ADVANCED(
OPENJPEG_LIBRARY
OPENJPEG_INCLUDE_DIR
)

View File

@ -1,40 +0,0 @@
# -*- cmake -*-
#
# Find the OpenSSH scp ("secure copy") or Putty pscp command.
#
# Input variables:
# SCP_FIND_REQUIRED - set this if configuration should fail without scp
#
# Output variables:
#
# SCP_FOUND - set if scp was found
# SCP_EXECUTABLE - path to scp or pscp executable
# SCP_BATCH_FLAG - how to put scp/pscp into batch mode
SET(SCP_EXECUTABLE)
IF (WINDOWS)
FIND_PROGRAM(SCP_EXECUTABLE NAMES pscp pscp.exe)
ELSE (WINDOWS)
FIND_PROGRAM(SCP_EXECUTABLE NAMES scp scp.exe)
ENDIF (WINDOWS)
IF (SCP_EXECUTABLE)
SET(SCP_FOUND ON)
ELSE (SCP_EXECUTABLE)
SET(SCP_FOUND OFF)
ENDIF (SCP_EXECUTABLE)
IF (SCP_FOUND)
GET_FILENAME_COMPONENT(_scp_name ${SCP_EXECUTABLE} NAME_WE)
IF (_scp_name STREQUAL scp)
SET(SCP_BATCH_FLAG -B)
ELSE (_scp_name STREQUAL scp)
SET(SCP_BATCH_FLAG -batch)
ENDIF (_scp_name STREQUAL scp)
ELSE (SCP_FOUND)
IF (SCP_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find scp or pscp executable")
ENDIF (SCP_FIND_REQUIRED)
ENDIF (SCP_FOUND)
MARK_AS_ADVANCED(SCP_EXECUTABLE SCP_FOUND SCP_BATCH_FLAG)

View File

@ -1,46 +0,0 @@
# -*- cmake -*-
# - Find uriparser
# Find the URIPARSER includes and library
# This module defines
# URIPARSER_INCLUDE_DIRS, where to find uriparser.h, etc.
# URIPARSER_LIBRARIES, the libraries needed to use uriparser.
# URIPARSER_FOUND, If false, do not try to use uriparser.
#
# This FindURIPARSER is about 43 times as fast the one provided with cmake (2.8.x),
# because it doesn't look up the version of uriparser, resulting in a dramatic
# speed up for configure (from 4 minutes 22 seconds to 6 seconds).
#
# Note: Since this file is only used for standalone, the windows
# specific parts were left out.
FIND_PATH(URIPARSER_INCLUDE_DIR uriparser/uri.h
NO_SYSTEM_ENVIRONMENT_PATH
)
FIND_LIBRARY(URIPARSER_LIBRARY uriparser)
if (URIPARSER_LIBRARY AND URIPARSER_INCLUDE_DIR)
SET(URIPARSER_INCLUDE_DIRS ${URIPARSER_INCLUDE_DIR})
SET(URIPARSER_LIBRARIES ${URIPARSER_LIBRARY})
SET(URIPARSER_FOUND "YES")
else (URIPARSER_LIBRARY AND URIPARSER_INCLUDE_DIR)
SET(URIPARSER_FOUND "NO")
endif (URIPARSER_LIBRARY AND URIPARSER_INCLUDE_DIR)
if (URIPARSER_FOUND)
if (NOT URIPARSER_FIND_QUIETLY)
message(STATUS "Found URIPARSER: ${URIPARSER_LIBRARIES}")
SET(URIPARSER_FIND_QUIETLY TRUE)
endif (NOT URIPARSER_FIND_QUIETLY)
else (URIPARSER_FOUND)
if (URIPARSER_FIND_REQUIRED)
message(FATAL_ERROR "Could not find URIPARSER library")
endif (URIPARSER_FIND_REQUIRED)
endif (URIPARSER_FOUND)
mark_as_advanced(
URIPARSER_LIBRARY
URIPARSER_INCLUDE_DIR
)

View File

@ -1,48 +0,0 @@
# -*- cmake -*-
# - Find XMLRPC-EPI
# Find the XMLRPC-EPI includes and library
# This module defines
# XMLRPCEPI_INCLUDE_DIR, where to find jpeglib.h, etc.
# XMLRPCEPI_LIBRARIES, the libraries needed to use XMLRPC-EPI.
# XMLRPCEPI_FOUND, If false, do not try to use XMLRPC-EPI.
# also defined, but not for general use are
# XMLRPCEPI_LIBRARY, where to find the XMLRPC-EPI library.
FIND_PATH(XMLRPCEPI_INCLUDE_DIR xmlrpc-epi/xmlrpc.h
/usr/local/include
/usr/include
)
SET(XMLRPCEPI_NAMES ${XMLRPCEPI_NAMES} xmlrpc-epi)
FIND_LIBRARY(XMLRPCEPI_LIBRARY
NAMES ${XMLRPCEPI_NAMES}
PATHS /usr/lib /usr/local/lib
)
IF (XMLRPCEPI_LIBRARY AND XMLRPCEPI_INCLUDE_DIR)
SET(XMLRPCEPI_LIBRARIES ${XMLRPCEPI_LIBRARY})
SET(XMLRPCEPI_FOUND "YES")
ELSE (XMLRPCEPI_LIBRARY AND XMLRPCEPI_INCLUDE_DIR)
SET(XMLRPCEPI_FOUND "NO")
ENDIF (XMLRPCEPI_LIBRARY AND XMLRPCEPI_INCLUDE_DIR)
IF (XMLRPCEPI_FOUND)
IF (NOT XMLRPCEPI_FIND_QUIETLY)
MESSAGE(STATUS "Found XMLRPC-EPI: ${XMLRPCEPI_LIBRARIES}")
ENDIF (NOT XMLRPCEPI_FIND_QUIETLY)
ELSE (XMLRPCEPI_FOUND)
IF (XMLRPCEPI_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find XMLRPC-EPI library")
ENDIF (XMLRPCEPI_FIND_REQUIRED)
ENDIF (XMLRPCEPI_FOUND)
# Deprecated declarations.
SET (NATIVE_XMLRPCEPI_INCLUDE_PATH ${XMLRPCEPI_INCLUDE_DIR} )
GET_FILENAME_COMPONENT (NATIVE_XMLRPCEPI_LIB_PATH ${XMLRPCEPI_LIBRARY} PATH)
MARK_AS_ADVANCED(
XMLRPCEPI_LIBRARY
XMLRPCEPI_INCLUDE_DIR
)

View File

@ -1,46 +0,0 @@
# -*- cmake -*-
# - Find zlib-ng
# Find the ZLIB includes and library
# This module defines
# ZLIBNG_INCLUDE_DIRS, where to find zlib.h, etc.
# ZLIBNG_LIBRARIES, the libraries needed to use zlib.
# ZLIBNG_FOUND, If false, do not try to use zlib.
#
# This FindZLIBNG is about 43 times as fast the one provided with cmake (2.8.x),
# because it doesn't look up the version of zlib, resulting in a dramatic
# speed up for configure (from 4 minutes 22 seconds to 6 seconds).
#
# Note: Since this file is only used for standalone, the windows
# specific parts were left out.
FIND_PATH(ZLIBNG_INCLUDE_DIR zlib.h
NO_SYSTEM_ENVIRONMENT_PATH
)
FIND_LIBRARY(ZLIBNG_LIBRARY z)
if (ZLIBNG_LIBRARY AND ZLIBNG_INCLUDE_DIR)
SET(ZLIBNG_INCLUDE_DIRS ${ZLIBNG_INCLUDE_DIR})
SET(ZLIBNG_LIBRARIES ${ZLIBNG_LIBRARY})
SET(ZLIBNG_FOUND "YES")
else (ZLIBNG_LIBRARY AND ZLIBNG_INCLUDE_DIR)
SET(ZLIBNG_FOUND "NO")
endif (ZLINGB_LIBRARY AND ZLIBNG_INCLUDE_DIR)
if (ZLIBNG_FOUND)
if (NOT ZLIBNG_FIND_QUIETLY)
message(STATUS "Found ZLIBNG: ${ZLIBNG_LIBRARIES}")
SET(ZLIBNG_FIND_QUIETLY TRUE)
endif (NOT ZLIBNG_FIND_QUIETLY)
else (ZLIBNG_FOUND)
if (ZLIBNG_FIND_REQUIRED)
message(FATAL_ERROR "Could not find ZLIBNG library")
endif (ZLIBNG_FIND_REQUIRED)
endif (ZLIBNG_FOUND)
mark_as_advanced(
ZLIBNG_LIBRARY
ZLIBNG_INCLUDE_DIR
)

View File

@ -6,13 +6,7 @@ if( TARGET freetype::freetype )
endif()
create_target( freetype::freetype)
if (USESYSTEMLIBS)
include(FindPkgConfig)
pkg_check_modules(FREETYPE REQUIRED freetype2)
else (USESYSTEMLIBS)
use_prebuilt_binary(freetype)
set_target_include_dirs( freetype::freetype ${LIBS_PREBUILT_DIR}/include/freetype2/)
set_target_libraries( freetype::freetype freetype )
endif (USESYSTEMLIBS)
use_prebuilt_binary(freetype)
set_target_include_dirs( freetype::freetype ${LIBS_PREBUILT_DIR}/include/freetype2/)
set_target_libraries( freetype::freetype freetype )

View File

@ -1,10 +1,8 @@
# -*- cmake -*-
include(Prebuilt)
if (NOT USESYSTEMLIBS)
if (WINDOWS OR LINUX)
use_prebuilt_binary(glext)
endif (WINDOWS OR LINUX)
use_prebuilt_binary(glh_linear)
set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
endif (NOT USESYSTEMLIBS)
if (WINDOWS OR LINUX)
use_prebuilt_binary(glext)
endif (WINDOWS OR LINUX)
use_prebuilt_binary(glh_linear)
set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)

View File

@ -4,8 +4,4 @@ include(Prebuilt)
set(GLH_FIND_REQUIRED TRUE)
set(GLH_FIND_QUIETLY TRUE)
if (USESYSTEMLIBS)
include(FindGLH)
else (USESYSTEMLIBS)
use_prebuilt_binary(glh_linear)
endif (USESYSTEMLIBS)
use_prebuilt_binary(glh_linear)

View File

@ -6,11 +6,7 @@ if( TARGET glod::glod )
endif()
create_target( glod::glod )
if (NOT USESYSTEMLIBS)
use_prebuilt_binary(glod)
endif (NOT USESYSTEMLIBS)
use_prebuilt_binary(glod)
set(GLODLIB ON CACHE BOOL "Using GLOD library")

View File

@ -1,12 +1,6 @@
# -*- cmake -*-
include(Prebuilt)
if (USESYSTEMLIBS)
include(FindPkgConfig)
pkg_check_modules(GSTREAMER010 REQUIRED gstreamer-0.10)
pkg_check_modules(GSTREAMER010_PLUGINS_BASE REQUIRED gstreamer-plugins-base-0.10)
elseif (LINUX)
if (LINUX)
use_prebuilt_binary(gstreamer)
# possible libxml2 should have its own .cmake file instead
use_prebuilt_binary(libxml2)
@ -26,7 +20,7 @@ elseif (LINUX)
gthread-2.0
glib-2.0
)
endif (USESYSTEMLIBS)
endif ()
if (GSTREAMER010_FOUND AND GSTREAMER010_PLUGINS_BASE_FOUND)
set(GSTREAMER010 ON CACHE BOOL "Build with GStreamer-0.10 streaming media support.")

View File

@ -6,19 +6,15 @@ if( TARGET hunspell::hunspell )
endif()
create_target( hunspell::hunspell )
if (USESYSTEMLIBS)
include(FindHUNSPELL)
else (USESYSTEMLIBS)
use_prebuilt_binary(libhunspell)
if (WINDOWS)
set_target_libraries( hunspell::hunspell libhunspell)
elseif(DARWIN)
set_target_libraries( hunspell::hunspell hunspell-1.3)
elseif(LINUX)
set_target_libraries( hunspell::hunspell hunspell-1.3)
else()
message(FATAL_ERROR "Invalid platform")
endif()
set_target_include_dirs( hunspell::hunspell ${LIBS_PREBUILT_DIR}/include/hunspell)
use_prebuilt_binary(dictionaries)
endif (USESYSTEMLIBS)
use_prebuilt_binary(libhunspell)
if (WINDOWS)
set_target_libraries( hunspell::hunspell libhunspell)
elseif(DARWIN)
set_target_libraries( hunspell::hunspell hunspell-1.3)
elseif(LINUX)
set_target_libraries( hunspell::hunspell hunspell-1.3)
else()
message(FATAL_ERROR "Invalid platform")
endif()
set_target_include_dirs( hunspell::hunspell ${LIBS_PREBUILT_DIR}/include/hunspell)
use_prebuilt_binary(dictionaries)

View File

@ -8,16 +8,12 @@ if( TARGET jpeglib::jpeglib )
endif()
create_target(jpeglib::jpeglib)
if (USESYSTEMLIBS)
include(FindJPEG)
else (USESYSTEMLIBS)
use_prebuilt_binary(jpeglib)
if (LINUX)
set_target_libraries( jpeglib::jpeglib jpeg)
elseif (DARWIN)
set_target_libraries( jpeglib::jpeglib jpeg)
elseif (WINDOWS)
set_target_libraries( jpeglib::jpeglib jpeglib)
endif (LINUX)
set_target_include_dirs( jpeglib::jpeglib ${LIBS_PREBUILT_DIR}/include)
endif (USESYSTEMLIBS)
use_prebuilt_binary(jpeglib)
if (LINUX)
set_target_libraries( jpeglib::jpeglib jpeg)
elseif (DARWIN)
set_target_libraries( jpeglib::jpeglib jpeg)
elseif (WINDOWS)
set_target_libraries( jpeglib::jpeglib jpeglib)
endif (LINUX)
set_target_include_dirs( jpeglib::jpeglib ${LIBS_PREBUILT_DIR}/include)

View File

@ -6,16 +6,12 @@ if( TARGET jsoncpp::jsoncpp )
endif()
create_target( jsoncpp::jsoncpp)
if (USESYSTEMLIBS)
include(FindJsonCpp)
else (USESYSTEMLIBS)
use_prebuilt_binary(jsoncpp)
if (WINDOWS)
set_target_libraries( jsoncpp::jsoncpp json_libmd.lib )
elseif (DARWIN)
set_target_libraries( jsoncpp::jsoncpp libjson_darwin_libmt.a )
elseif (LINUX)
set_target_libraries( jsoncpp::jsoncpp libjson_linux-gcc-4.1.3_libmt.a )
endif (WINDOWS)
set_target_include_dirs( jsoncpp::jsoncpp ${LIBS_PREBUILT_DIR}/include/json)
endif (USESYSTEMLIBS)
use_prebuilt_binary(jsoncpp)
if (WINDOWS)
set_target_libraries( jsoncpp::jsoncpp json_libmd.lib )
elseif (DARWIN)
set_target_libraries( jsoncpp::jsoncpp libjson_darwin_libmt.a )
elseif (LINUX)
set_target_libraries( jsoncpp::jsoncpp libjson_linux-gcc-4.1.3_libmt.a )
endif (WINDOWS)
set_target_include_dirs( jsoncpp::jsoncpp ${LIBS_PREBUILT_DIR}/include/json)

View File

@ -223,10 +223,6 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
COMPILE_DEFINITIONS "LL_TEST=${testname};LL_TEST_${testname}"
)
if(USESYSTEMLIBS)
SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}")
endif(USESYSTEMLIBS)
if (USE_BUGSPLAT)
SET_PROPERTY(SOURCE ${source_files}
APPEND PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}")
@ -304,10 +300,6 @@ MACRO(SET_TEST_PATH LISTVAR)
set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources ${SHARED_LIB_STAGING_DIR}/Release/Resources /usr/lib)
ELSE(WINDOWS)
# Linux uses a single staging directory anyway.
IF (USESYSTEMLIBS)
set(${LISTVAR} ${CMAKE_BINARY_DIR}/llcommon /usr/lib /usr/local/lib)
ELSE (USESYSTEMLIBS)
set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib)
ENDIF (USESYSTEMLIBS)
set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib)
ENDIF(WINDOWS)
ENDMACRO(SET_TEST_PATH)

View File

@ -9,22 +9,11 @@ if( TARGET sdl::sdl)
endif()
create_target(sdl::sdl)
if (USESYSTEMLIBS)
include(FindSDL)
# This should be done by FindSDL. Sigh.
mark_as_advanced(
SDLMAIN_LIBRARY
SDL_INCLUDE_DIR
SDL_LIBRARY
)
else (USESYSTEMLIBS)
if (LINUX)
use_prebuilt_binary(SDL)
set_target_include_dirs( sdl::sdl ${LIBS_PREBUILT_DIR}/i686-linux)
set_target_libraries( sdl::sdl SDL directfb fusion direct X11)
target_compile_definitions( sdl::sdl INTERFACE LL_SDL=1)
endif (LINUX)
endif (USESYSTEMLIBS)
if (LINUX)
use_prebuilt_binary(SDL)
set_target_include_dirs( sdl::sdl ${LIBS_PREBUILT_DIR}/i686-linux)
set_target_libraries( sdl::sdl SDL directfb fusion direct X11)
target_compile_definitions( sdl::sdl INTERFACE LL_SDL=1)
endif (LINUX)

View File

@ -7,15 +7,10 @@ if( TARGET libvlc::libvlc )
endif()
create_target( libvlc::libvlc )
if (USESYSTEMLIBS)
set(LIBVLCPLUGIN OFF CACHE BOOL
use_prebuilt_binary(vlc-bin)
set(LIBVLCPLUGIN ON CACHE BOOL
"LIBVLCPLUGIN support for the llplugin/llmedia test apps.")
else (USESYSTEMLIBS)
use_prebuilt_binary(vlc-bin)
set(LIBVLCPLUGIN ON CACHE BOOL
"LIBVLCPLUGIN support for the llplugin/llmedia test apps.")
set(VLC_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/vlc)
endif (USESYSTEMLIBS)
set(VLC_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/vlc)
if (WINDOWS)
set_target_libraries( libvlc::libvlc

View File

@ -9,23 +9,18 @@ endif()
create_target( ndof::ndof )
if (NDOF)
if (USESYSTEMLIBS)
set(NDOF_FIND_REQUIRED ON)
include(FindNDOF)
else (USESYSTEMLIBS)
if (WINDOWS OR DARWIN)
use_prebuilt_binary(libndofdev)
elseif (LINUX)
use_prebuilt_binary(open-libndofdev)
endif (WINDOWS OR DARWIN)
if (WINDOWS OR DARWIN)
use_prebuilt_binary(libndofdev)
elseif (LINUX)
use_prebuilt_binary(open-libndofdev)
endif (WINDOWS OR DARWIN)
if (WINDOWS)
set_target_libraries( ndof::ndof libndofdev)
elseif (DARWIN OR LINUX)
set_target_libraries( ndof::ndof ndofdev)
endif (WINDOWS)
target_compile_definitions( ndof::ndof INTERFACE LIB_NDOF=1)
endif (USESYSTEMLIBS)
if (WINDOWS)
set_target_libraries( ndof::ndof libndofdev)
elseif (DARWIN OR LINUX)
set_target_libraries( ndof::ndof ndofdev)
endif (WINDOWS)
target_compile_definitions( ndof::ndof INTERFACE LIB_NDOF=1)
endif (NDOF)
if (NOT NDOF_FOUND)

View File

@ -5,16 +5,12 @@ if( TARGET nghttp2::nghttp2 )
endif()
create_target( nghttp2::nghttp2 )
if (USESYSTEMLIBS)
include(FindNGHTTP2)
else (USESYSTEMLIBS)
use_prebuilt_binary(nghttp2)
if (WINDOWS)
set_target_libraries( nghttp2::nghttp2 ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib)
elseif (DARWIN)
set_target_libraries( nghttp2::nghttp2 libnghttp2.dylib)
else (WINDOWS)
set_target_libraries( nghttp2::nghttp2 libnghttp2.a )
endif (WINDOWS)
set_target_include_dirs( nghttp2::nghttp2 ${LIBS_PREBUILT_DIR}/include/nghttp2)
endif (USESYSTEMLIBS)
use_prebuilt_binary(nghttp2)
if (WINDOWS)
set_target_libraries( nghttp2::nghttp2 ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib)
elseif (DARWIN)
set_target_libraries( nghttp2::nghttp2 libnghttp2.dylib)
else (WINDOWS)
set_target_libraries( nghttp2::nghttp2 libnghttp2.a )
endif (WINDOWS)
set_target_include_dirs( nghttp2::nghttp2 ${LIBS_PREBUILT_DIR}/include/nghttp2)

View File

@ -16,14 +16,7 @@ if (OPENAL)
create_target( openal::openal )
set_target_include_dirs( openal::openal "${LIBS_PREBUILT_DIR}/include/AL")
if (USESYSTEMLIBS)
include(FindPkgConfig)
include(FindOpenAL)
pkg_check_modules(OPENAL_LIB REQUIRED openal)
pkg_check_modules(FREEALUT_LIB REQUIRED freealut)
else (USESYSTEMLIBS)
use_prebuilt_binary(openal)
endif (USESYSTEMLIBS)
use_prebuilt_binary(openal)
if(WINDOWS)
set_target_libraries( openal::openal

View File

@ -6,11 +6,7 @@ if( TARGET openjpeg::openjpeg )
endif()
create_target( openjpeg::openjpeg )
if (USESYSTEMLIBS)
include(FindOpenJPEG)
else (USESYSTEMLIBS)
use_prebuilt_binary(openjpeg)
set_target_libraries(openjpeg::openjpeg openjpeg )
set_target_include_dirs( openjpeg::openjpeg ${LIBS_PREBUILT_DIR}/include/openjpeg)
endif (USESYSTEMLIBS)
use_prebuilt_binary(openjpeg)
set_target_libraries(openjpeg::openjpeg openjpeg )
set_target_include_dirs( openjpeg::openjpeg ${LIBS_PREBUILT_DIR}/include/openjpeg)

View File

@ -6,17 +6,13 @@ if( TARGET openssl::openssl )
endif()
create_target(openssl::openssl)
if (USESYSTEMLIBS)
include(FindOpenSSL)
else (USESYSTEMLIBS)
use_prebuilt_binary(openssl)
if (WINDOWS)
set_target_libraries(openssl::openssl libssl libcrypto)
elseif (LINUX)
set_target_libraries(openssl::openssl ssl crypto dl)
else()
set_target_libraries(openssl::openssl ssl crypto)
endif (WINDOWS)
set_target_include_dirs(openssl::openssl ${LIBS_PREBUILT_DIR}/include)
endif (USESYSTEMLIBS)
use_prebuilt_binary(openssl)
if (WINDOWS)
set_target_libraries(openssl::openssl libssl libcrypto)
elseif (LINUX)
set_target_libraries(openssl::openssl ssl crypto dl)
else()
set_target_libraries(openssl::openssl ssl crypto)
endif (WINDOWS)
set_target_include_dirs(openssl::openssl ${LIBS_PREBUILT_DIR}/include)

View File

@ -6,17 +6,10 @@ if( TARGET libpng::libpng )
endif()
create_target(libpng::libpng)
set(PNG_FIND_QUIETLY ON)
set(PNG_FIND_REQUIRED ON)
if (USESYSTEMLIBS)
include(FindPNG)
else (USESYSTEMLIBS)
use_prebuilt_binary(libpng)
if (WINDOWS)
set_target_libraries(libpng::libpng libpng16)
else()
set_target_libraries(libpng::libpng png16 )
endif()
set_target_include_dirs( libpng::libpng ${LIBS_PREBUILT_DIR}/include/libpng16)
endif (USESYSTEMLIBS)
use_prebuilt_binary(libpng)
if (WINDOWS)
set_target_libraries(libpng::libpng libpng16)
else()
set_target_libraries(libpng::libpng png16 )
endif()
set_target_include_dirs( libpng::libpng ${LIBS_PREBUILT_DIR}/include/libpng16)

View File

@ -4,23 +4,16 @@ include(Prebuilt)
set(PULSEAUDIO OFF CACHE BOOL "Build with PulseAudio support, if available.")
if (PULSEAUDIO)
if (USESYSTEMLIBS)
include(FindPkgConfig)
pkg_check_modules(PULSEAUDIO libpulse)
elseif (LINUX)
use_prebuilt_binary(pulseaudio)
set(PULSEAUDIO_FOUND ON FORCE BOOL)
set(PULSEAUDIO_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include
)
# We don't need to explicitly link against pulseaudio itself, because
# the viewer probes for the system's copy at runtime.
set(PULSEAUDIO_LIBRARIES
# none needed!
)
endif (USESYSTEMLIBS)
use_prebuilt_binary(pulseaudio)
set(PULSEAUDIO_FOUND ON FORCE BOOL)
set(PULSEAUDIO_INCLUDE_DIRS
${LIBS_PREBUILT_DIR}/include
)
# We don't need to explicitly link against pulseaudio itself, because
# the viewer probes for the system's copy at runtime.
set(PULSEAUDIO_LIBRARIES
# none needed!
)
endif (PULSEAUDIO)
if (PULSEAUDIO_FOUND)

View File

@ -1,6 +1,4 @@
# -*- cmake -*-
include(Prebuilt)
if (NOT USESYSTEMLIBS)
use_prebuilt_binary(tut)
endif(NOT USESYSTEMLIBS)
use_prebuilt_binary(tut)

View File

@ -2,67 +2,36 @@
include(Prebuilt)
include(FreeType)
if (USESYSTEMLIBS)
include(FindPkgConfig)
if (LINUX)
set(PKGCONFIG_PACKAGES
atk
cairo
gdk-2.0
gdk-pixbuf-2.0
glib-2.0
gmodule-2.0
gtk+-2.0
gthread-2.0
libpng
pango
pangoft2
pangox
pangoxft
sdl
)
endif (LINUX)
if (LINUX)
use_prebuilt_binary(gtk-atk-pango-glib)
endif (LINUX)
foreach(pkg ${PKGCONFIG_PACKAGES})
pkg_check_modules(${pkg} REQUIRED ${pkg})
include_directories(${${pkg}_INCLUDE_DIRS})
link_directories(${${pkg}_LIBRARY_DIRS})
list(APPEND UI_LIBRARIES ${${pkg}_LIBRARIES})
add_definitions(${${pkg}_CFLAGS_OTHERS})
endforeach(pkg)
else (USESYSTEMLIBS)
if (LINUX)
use_prebuilt_binary(gtk-atk-pango-glib)
endif (LINUX)
if (LINUX)
set(UI_LIBRARIES
atk-1.0
gdk-x11-2.0
gdk_pixbuf-2.0
Xinerama
glib-2.0
gmodule-2.0
gobject-2.0
gthread-2.0
gtk-x11-2.0
pango-1.0
pangoft2-1.0
pangox-1.0
pangoxft-1.0
${FREETYPE_LIBRARIES}
)
endif (LINUX)
if (LINUX)
set(UI_LIBRARIES
atk-1.0
gdk-x11-2.0
gdk_pixbuf-2.0
Xinerama
glib-2.0
gmodule-2.0
gobject-2.0
gthread-2.0
gtk-x11-2.0
pango-1.0
pangoft2-1.0
pangox-1.0
pangoxft-1.0
${FREETYPE_LIBRARIES}
)
endif (LINUX)
include_directories (
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_DIR}/include
)
foreach(include ${${LL_ARCH}_INCLUDES})
include_directories(${LIBS_PREBUILT_DIR}/include/${include})
endforeach(include)
endif (USESYSTEMLIBS)
include_directories (
${LIBS_PREBUILT_DIR}/include
${LIBS_PREBUILT_DIR}/include
)
foreach(include ${${LL_ARCH}_INCLUDES})
include_directories(${LIBS_PREBUILT_DIR}/include/${include})
endforeach(include)
if (LINUX)
add_definitions(-DLL_GTK=1 -DLL_X11=1)

View File

@ -7,16 +7,12 @@ create_target( uriparser::uriparser )
include(Prebuilt)
if (USESYSTEMLIBS)
include(FindURIPARSER)
else (USESYSTEMLIBS)
use_prebuilt_binary(uriparser)
if (WINDOWS)
set_target_libraries( uriparser::uriparser uriparser)
elseif (LINUX)
set_target_libraries( uriparser::uriparser uriparser)
elseif (DARWIN)
set_target_libraries( uriparser::uriparser liburiparser.dylib)
endif (WINDOWS)
set_target_include_dirs( uriparser::uriparser ${LIBS_PREBUILT_DIR}/include/uriparser)
endif (USESYSTEMLIBS)
use_prebuilt_binary(uriparser)
if (WINDOWS)
set_target_libraries( uriparser::uriparser uriparser)
elseif (LINUX)
set_target_libraries( uriparser::uriparser uriparser)
elseif (DARWIN)
set_target_libraries( uriparser::uriparser liburiparser.dylib)
endif (WINDOWS)
set_target_include_dirs( uriparser::uriparser ${LIBS_PREBUILT_DIR}/include/uriparser)

View File

@ -214,7 +214,6 @@ set(ENABLE_SIGNING OFF CACHE BOOL "Enable signing the viewer")
set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if necessary.")
set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside")
set(USESYSTEMLIBS OFF CACHE BOOL "Use libraries from your system rather than Linden-supplied prebuilt libraries.")
set(USE_PRECOMPILED_HEADERS ON CACHE BOOL "Enable use of precompiled header directives where supported.")

View File

@ -1,12 +1,10 @@
# -*- cmake -*-
include(Prebuilt)
if (NOT USESYSTEMLIBS)
if (LINUX)
use_prebuilt_binary(libuuid)
use_prebuilt_binary(fontconfig)
endif (LINUX)
use_prebuilt_binary(libhunspell)
use_prebuilt_binary(slvoice)
endif(NOT USESYSTEMLIBS)
if (LINUX)
use_prebuilt_binary(libuuid)
use_prebuilt_binary(fontconfig)
endif (LINUX)
use_prebuilt_binary(libhunspell)
use_prebuilt_binary(slvoice)

View File

@ -6,10 +6,6 @@ if( TARGET xmlrpc-epi::xmlrpc-epi )
endif()
create_target( xmlrpc-epi::xmlrpc-epi )
if (USESYSTEMLIBS)
include(FindXmlRpcEpi)
else (USESYSTEMLIBS)
use_prebuilt_binary(xmlrpc-epi)
set_target_libraries(xmlrpc-epi::xmlrpc-epi xmlrpc-epi )
set_target_include_dirs( xmlrpc-epi::xmlrpc-epi ${LIBS_PREBUILT_DIR}/include)
endif (USESYSTEMLIBS)
use_prebuilt_binary(xmlrpc-epi)
set_target_libraries(xmlrpc-epi::xmlrpc-epi xmlrpc-epi )
set_target_include_dirs( xmlrpc-epi::xmlrpc-epi ${LIBS_PREBUILT_DIR}/include)

View File

@ -7,14 +7,10 @@ if( TARGET zlib-ng::zlib-ng )
endif()
create_target(zlib-ng::zlib-ng)
if (USESYSTEMLIBS)
include(FindZLIBNG)
else (USESYSTEMLIBS)
use_prebuilt_binary(zlib-ng)
if (WINDOWS)
set_target_libraries( zlib-ng::zlib-ng zlib )
else()
set_target_libraries( zlib-ng::zlib-ng z )
endif (WINDOWS)
set_target_include_dirs( zlib-ng::zlib-ng ${LIBS_PREBUILT_DIR}/include/zlib-ng)
endif (USESYSTEMLIBS)
use_prebuilt_binary(zlib-ng)
if (WINDOWS)
set_target_libraries( zlib-ng::zlib-ng zlib )
else()
set_target_libraries( zlib-ng::zlib-ng z )
endif (WINDOWS)
set_target_include_dirs( zlib-ng::zlib-ng ${LIBS_PREBUILT_DIR}/include/zlib-ng)

View File

@ -15,25 +15,21 @@ endif()
create_target(bugsplat::bugsplat)
if (USE_BUGSPLAT)
if (NOT USESYSTEMLIBS)
include(Prebuilt)
use_prebuilt_binary(bugsplat)
if (WINDOWS)
set_target_libraries( bugsplat::bugsplat
include(Prebuilt)
use_prebuilt_binary(bugsplat)
if (WINDOWS)
set_target_libraries( bugsplat::bugsplat
${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib
)
elseif (DARWIN)
find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED
elseif (DARWIN)
find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED
NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}")
set_target_libraries( bugsplat::bugsplat
${BUGSPLAT_LIBRARIES}
)
else (WINDOWS)
message(FATAL_ERROR "BugSplat is not supported; add -DUSE_BUGSPLAT=OFF")
endif (WINDOWS)
else (NOT USESYSTEMLIBS)
include(FindBUGSPLAT)
endif (NOT USESYSTEMLIBS)
set_target_libraries( bugsplat::bugsplat
${BUGSPLAT_LIBRARIES}
)
else (WINDOWS)
message(FATAL_ERROR "BugSplat is not supported; add -DUSE_BUGSPLAT=OFF")
endif (WINDOWS)
set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name")

View File

@ -1553,9 +1553,7 @@ if (WINDOWS)
SOURCE_GROUP("Resource Files" FILES ${viewer_RESOURCE_FILES})
if (NOT USESYSTEMLIBS)
list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES})
endif (NOT USESYSTEMLIBS)
list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES})
# see EXP-1765 - theory is opengl32.lib needs to be included before gdi32.lib (windows libs)
set(viewer_LIBRARIES
@ -1673,9 +1671,7 @@ source_group("Character File" FILES ${viewer_CHARACTER_FILES})
set_source_files_properties(${viewer_CHARACTER_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
if (NOT USESYSTEMLIBS)
list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES})
endif (NOT USESYSTEMLIBS)
list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES})
if (WINDOWS)
file(GLOB viewer_INSTALLER_FILES installers/windows/*.nsi)