Be more explicit: Rename use_conan_binary to use_system_binary, this will allow us to reuse the macro for more than just conan.
parent
c66f444d2b
commit
3f31d0b5a7
|
|
@ -17,11 +17,13 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_CURRENT_BINARY_DIR}"
|
|||
|
||||
include(conanbuildinfo OPTIONAL RESULT_VARIABLE USE_CONAN )
|
||||
if( USE_CONAN )
|
||||
set( USE_CONAN ON )
|
||||
conan_basic_setup(TARGETS NO_OUTPUT_DIRS)
|
||||
add_compile_definitions(LL_USESYSTEMLIBS USE_CONAN)
|
||||
set( USE_CONAN ON )
|
||||
set( USE_AUTOBUILD_3P OFF )
|
||||
conan_basic_setup(TARGETS NO_OUTPUT_DIRS)
|
||||
add_compile_definitions(LL_USESYSTEMLIBS USE_CONAN NO_AUTOBUILD_3P)
|
||||
else()
|
||||
set( USE_CONAN OFF )
|
||||
set( USE_AUTOBUILD_3P ON )
|
||||
endif()
|
||||
|
||||
set(CXX_STANDARD 14)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ include_guard()
|
|||
|
||||
add_library( ll::apr INTERFACE IMPORTED )
|
||||
|
||||
use_conan_binary( apr apr-util )
|
||||
use_system_binary( apr apr-util )
|
||||
use_prebuilt_binary(apr_suite)
|
||||
|
||||
if (WINDOWS)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ include(Prebuilt)
|
|||
include_guard()
|
||||
add_library( ll::vorbis INTERFACE IMPORTED )
|
||||
|
||||
use_conan_binary(vorbis)
|
||||
use_system_binary(vorbis)
|
||||
use_prebuilt_binary(ogg_vorbis)
|
||||
target_include_directories( ll::vorbis SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ include(Prebuilt)
|
|||
include_guard()
|
||||
add_library( ll::libcurl INTERFACE IMPORTED )
|
||||
|
||||
use_conan_binary(libcurl)
|
||||
use_system_binary(libcurl)
|
||||
use_prebuilt_binary(curl)
|
||||
if (WINDOWS)
|
||||
target_link_libraries(ll::libcurl INTERFACE libcurl.lib)
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ elseif(LINUX)
|
|||
${EXPAT_COPY}
|
||||
)
|
||||
|
||||
if( NOT USE_CONAN )
|
||||
if( USE_AUTOBUILD_3P )
|
||||
list( APPEND release_files
|
||||
libapr-1.so.0
|
||||
libaprutil-1.so.0
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ include(Prebuilt)
|
|||
|
||||
add_library( ll::dbus INTERFACE IMPORTED)
|
||||
|
||||
# Only define this when using conan, lls prebuild is broken
|
||||
if( USE_CONAN )
|
||||
# Only define this when not using the prebuild 3ps, lls prebuild is broken
|
||||
if( NOT USE_AUTOBUILD_3P )
|
||||
target_compile_definitions( ll::dbus INTERFACE LL_DBUS_ENABLED )
|
||||
endif()
|
||||
use_conan_binary(dbus)
|
||||
use_system_binary(dbus)
|
||||
|
||||
use_prebuilt_binary(dbus_glib)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ include(Prebuilt)
|
|||
include_guard()
|
||||
add_library( ll::expat INTERFACE IMPORTED )
|
||||
|
||||
use_conan_binary(expat)
|
||||
use_system_binary(expat)
|
||||
use_prebuilt_binary(expat)
|
||||
if (WINDOWS)
|
||||
target_link_libraries( ll::expat INTERFACE libexpatMT )
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ include(Prebuilt)
|
|||
include_guard()
|
||||
add_library( ll::freetype INTERFACE IMPORTED )
|
||||
|
||||
use_conan_binary(freetype)
|
||||
use_system_binary(freetype)
|
||||
use_prebuilt_binary(freetype)
|
||||
target_include_directories( ll::freetype SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/freetype2/)
|
||||
target_link_libraries( ll::freetype INTERFACE freetype )
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ include(GLH)
|
|||
|
||||
add_library( ll::glext INTERFACE IMPORTED )
|
||||
if (WINDOWS OR LINUX)
|
||||
use_conan_binary(glext)
|
||||
use_system_binary(glext)
|
||||
use_prebuilt_binary(glext)
|
||||
endif (WINDOWS OR LINUX)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ include(Prebuilt)
|
|||
|
||||
add_library( ll::glh_linear INTERFACE IMPORTED )
|
||||
|
||||
use_conan_binary( glh_linear )
|
||||
use_system_binary( glh_linear )
|
||||
use_prebuilt_binary(glh_linear)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ endif()
|
|||
|
||||
add_library( ll::gstreamer INTERFACE IMPORTED )
|
||||
target_compile_definitions( ll::gstreamer INTERFACE LL_GSTREAMER010_ENABLED=1)
|
||||
use_conan_binary(gstreamer)
|
||||
use_system_binary(gstreamer)
|
||||
|
||||
use_prebuilt_binary(gstreamer)
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ include_guard()
|
|||
use_prebuilt_binary(dictionaries)
|
||||
|
||||
add_library( ll::hunspell INTERFACE IMPORTED )
|
||||
use_conan_binary(hunspell)
|
||||
use_system_binary(hunspell)
|
||||
use_prebuilt_binary(libhunspell)
|
||||
if (WINDOWS)
|
||||
target_link_libraries( ll::hunspell INTERFACE libhunspell)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ include(Linking)
|
|||
include_guard()
|
||||
add_library( ll::libjpeg INTERFACE IMPORTED )
|
||||
|
||||
use_conan_binary(libjpeg)
|
||||
use_system_binary(libjpeg)
|
||||
use_prebuilt_binary(jpeglib)
|
||||
if (LINUX)
|
||||
target_link_libraries( ll::libjpeg INTERFACE jpeg)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ include(Prebuilt)
|
|||
include_guard()
|
||||
add_library( ll::jsoncpp INTERFACE IMPORTED )
|
||||
|
||||
use_conan_binary(jsoncpp)
|
||||
use_system_binary(jsoncpp)
|
||||
|
||||
use_prebuilt_binary(jsoncpp)
|
||||
if (WINDOWS)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ if( USE_CONAN )
|
|||
"${CONAN_INCLUDE_DIRS_COLLADADOM}/collada-dom/1.4/" )
|
||||
endif()
|
||||
|
||||
use_conan_binary( colladadom )
|
||||
use_system_binary( colladadom )
|
||||
|
||||
use_prebuilt_binary(colladadom)
|
||||
use_prebuilt_binary(minizip-ng) # needed for colladadom
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ add_library( ll::SDL INTERFACE IMPORTED )
|
|||
|
||||
|
||||
if (LINUX)
|
||||
#Must come first as use_conan_binary can exit this file early
|
||||
#Must come first as use_system_binary can exit this file early
|
||||
target_compile_definitions( ll::SDL INTERFACE LL_SDL=1)
|
||||
|
||||
use_conan_binary(SDL)
|
||||
use_system_binary(SDL)
|
||||
use_prebuilt_binary(SDL)
|
||||
|
||||
target_include_directories( ll::SDL SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ include(Prebuilt)
|
|||
include_guard()
|
||||
add_library( ll::meshoptimizer INTERFACE IMPORTED )
|
||||
|
||||
use_conan_binary(meshoptimizer)
|
||||
use_system_binary(meshoptimizer)
|
||||
use_prebuilt_binary(meshoptimizer)
|
||||
|
||||
if (WINDOWS)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ include(Prebuilt)
|
|||
include_guard()
|
||||
add_library( ll::nghttp2 INTERFACE IMPORTED )
|
||||
|
||||
use_conan_binary(nghttp2)
|
||||
use_system_binary(nghttp2)
|
||||
use_prebuilt_binary(nghttp2)
|
||||
if (WINDOWS)
|
||||
target_link_libraries( ll::nghttp2 INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ include(Prebuilt)
|
|||
include_guard()
|
||||
add_library( ll::openjpeg INTERFACE IMPORTED )
|
||||
|
||||
use_conan_binary(openjpeg)
|
||||
use_system_binary(openjpeg)
|
||||
use_prebuilt_binary(openjpeg)
|
||||
|
||||
target_link_libraries(ll::openjpeg INTERFACE openjpeg )
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ include(Prebuilt)
|
|||
include_guard()
|
||||
add_library( ll::openssl INTERFACE IMPORTED )
|
||||
|
||||
use_conan_binary(openssl)
|
||||
use_system_binary(openssl)
|
||||
use_prebuilt_binary(openssl)
|
||||
if (WINDOWS)
|
||||
target_link_libraries(ll::openssl INTERFACE libssl libcrypto)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ include(Prebuilt)
|
|||
include_guard()
|
||||
add_library( ll::libpng INTERFACE IMPORTED )
|
||||
|
||||
use_conan_binary(libpng)
|
||||
use_system_binary(libpng)
|
||||
use_prebuilt_binary(libpng)
|
||||
if (WINDOWS)
|
||||
target_link_libraries(ll::libpng INTERFACE libpng16)
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ macro (use_prebuilt_binary _binary)
|
|||
endmacro (use_prebuilt_binary _binary)
|
||||
|
||||
#Sadly we need a macro here, otherwise the return() will not properly work
|
||||
macro ( use_conan_binary package )
|
||||
macro ( use_system_binary package )
|
||||
if( USE_CONAN )
|
||||
target_link_libraries( ll::${package} INTERFACE CONAN_PKG::${package} )
|
||||
foreach( extra_pkg "${ARGN}" )
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ add_library( ll::tracy INTERFACE IMPORTED )
|
|||
set(USE_TRACY OFF CACHE BOOL "Use Tracy profiler.")
|
||||
|
||||
if (USE_TRACY)
|
||||
use_conan_binary(tracy)
|
||||
use_system_binary(tracy)
|
||||
use_prebuilt_binary(tracy)
|
||||
|
||||
target_include_directories( ll::tracy SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/tracy)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ include(Prebuilt)
|
|||
|
||||
add_library( ll::uriparser INTERFACE IMPORTED )
|
||||
|
||||
use_conan_binary( uriparser )
|
||||
use_system_binary( uriparser )
|
||||
|
||||
use_prebuilt_binary(uriparser)
|
||||
if (WINDOWS)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ include(Prebuilt)
|
|||
include_guard()
|
||||
add_library( ll::xmlrpc-epi INTERFACE IMPORTED )
|
||||
|
||||
use_conan_binary( xmlrpc-epi )
|
||||
use_system_binary( xmlrpc-epi )
|
||||
|
||||
use_prebuilt_binary(xmlrpc-epi)
|
||||
target_link_libraries(ll::xmlrpc-epi INTERFACE xmlrpc-epi )
|
||||
|
|
|
|||
Loading…
Reference in New Issue