2018-02-27 23:28:48 +01:00
|
|
|
function(rwdep_wrap_find_packages)
|
2018-06-24 00:43:06 +02:00
|
|
|
if(BULLET_FOUND AND NOT TARGET bullet::bullet)
|
|
|
|
add_library(bullet INTERFACE)
|
|
|
|
target_link_libraries(bullet
|
|
|
|
INTERFACE
|
|
|
|
${BULLET_LIBRARIES}
|
|
|
|
)
|
|
|
|
target_include_directories(bullet SYSTEM
|
|
|
|
INTERFACE
|
|
|
|
"${BULLET_INCLUDE_DIR}"
|
|
|
|
)
|
|
|
|
add_library(bullet::bullet ALIAS bullet)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(OPENAL_FOUND AND NOT TARGET OpenAL::OpenAL)
|
|
|
|
add_library(OpenAL INTERFACE)
|
|
|
|
target_link_libraries(OpenAL
|
|
|
|
INTERFACE
|
|
|
|
"${OPENAL_LIBRARY}"
|
|
|
|
)
|
|
|
|
target_include_directories(OpenAL SYSTEM
|
|
|
|
INTERFACE
|
|
|
|
"${OPENAL_INCLUDE_DIR}"
|
|
|
|
)
|
|
|
|
add_library(OpenAL::OpenAL ALIAS OpenAL)
|
2018-08-09 23:08:07 +02:00
|
|
|
endif()
|
2018-02-27 23:28:48 +01:00
|
|
|
endfunction()
|
2018-06-07 02:19:53 +02:00
|
|
|
|
|
|
|
function(rwdep_wrap_conan_target TARGET CONAN_NAME)
|
2018-07-06 02:25:48 +02:00
|
|
|
string(RANDOM RND)
|
|
|
|
set(TGT "CONAN_${CONAN_NAME}_${RND}")
|
|
|
|
add_library("${TGT}" INTERFACE)
|
|
|
|
target_link_libraries("${TGT}" INTERFACE "CONAN_PKG::${CONAN_NAME}")
|
|
|
|
add_library("${TARGET}" ALIAS "${TGT}")
|
2018-06-07 02:19:53 +02:00
|
|
|
endfunction()
|
|
|
|
|
|
|
|
function(rwdep_wrap_conan_targets)
|
2018-06-24 00:43:06 +02:00
|
|
|
rwdep_wrap_conan_target(OpenAL::OpenAL openal)
|
|
|
|
rwdep_wrap_conan_target(bullet::bullet bullet)
|
|
|
|
rwdep_wrap_conan_target(glm::glm glm)
|
|
|
|
rwdep_wrap_conan_target(ffmpeg::ffmpeg ffmpeg)
|
|
|
|
rwdep_wrap_conan_target(SDL2::SDL2 sdl2)
|
2018-08-09 23:08:07 +02:00
|
|
|
if(BUILD_TOOLS)
|
2018-06-24 00:43:06 +02:00
|
|
|
rwdep_wrap_conan_target(Freetype::Freetype freetype)
|
2018-08-09 23:08:07 +02:00
|
|
|
endif()
|
2018-07-06 02:25:48 +02:00
|
|
|
|
|
|
|
rwdep_wrap_conan_target(Boost::boost boost)
|
|
|
|
rwdep_wrap_conan_target(Boost::filesystem boost)
|
|
|
|
rwdep_wrap_conan_target(Boost::program_options boost)
|
|
|
|
rwdep_wrap_conan_target(Boost::system boost)
|
|
|
|
rwdep_wrap_conan_target(Boost::unit_test_framework boost)
|
2018-06-07 02:19:53 +02:00
|
|
|
endfunction()
|