Be more explicit: Rename use_conan_binary to use_system_binary, this will allow us to reuse the macro for more than just conan.

master
Nicky 2022-07-17 17:51:25 +02:00
parent c66f444d2b
commit 3f31d0b5a7
25 changed files with 32 additions and 30 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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 )

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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 )

View File

@ -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 )

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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 )

View File

@ -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)

View File

@ -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)

View File

@ -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}" )

View File

@ -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)

View File

@ -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)

View File

@ -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 )