mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-22 02:12:45 +01:00
cmake: Optionally create XXX:XXX targets for override packages
This commit is contained in:
parent
4dc7da89ad
commit
934506f0c8
0
.gitmodules
vendored
0
.gitmodules
vendored
@ -3,7 +3,7 @@
|
||||
|
||||
include("${CMAKE_ROOT}/Modules/FindBullet.cmake")
|
||||
|
||||
if(BULLET_FOUND)
|
||||
if(BULLET_FOUND AND NOT TARGET bullet::bullet)
|
||||
list(GET BULLET_LIBRARIES 0 BULLET_FIRST_LIBRARY)
|
||||
set(BULLET_OTHER_LIBRARIES "${BULLET_LIBRARIES}")
|
||||
list(REMOVE_AT BULLET_OTHER_LIBRARIES 0)
|
||||
|
@ -61,7 +61,7 @@ ${FFMPEG_LIBAVUTIL}
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(FFmpeg DEFAULT_MSG FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIR)
|
||||
|
||||
if(FFMPEG_FOUND)
|
||||
if(FFMPEG_FOUND AND NOT TARGET ffmpeg::ffmpeg)
|
||||
list(GET FFMPEG_LIBRARIES 0 FFMPEG_FIRST_LIBRARY)
|
||||
set(FFMPEG_OTHER_LIBRARIES "${FFMPEG_LIBRARIES}")
|
||||
list(REMOVE_AT FFMPEG_OTHER_LIBRARIES 0)
|
||||
|
@ -64,7 +64,7 @@ IF(GLM_FOUND)
|
||||
ENDIF(NOT GLM_FIND_QUIETLY)
|
||||
ENDIF(GLM_FOUND)
|
||||
|
||||
if(GLM_FOUND)
|
||||
if(GLM_FOUND AND NOT TARGET glm::glm)
|
||||
add_library(glm::glm INTERFACE IMPORTED)
|
||||
set_target_properties(glm::glm PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GLM_INCLUDE_DIR}"
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
include("${CMAKE_ROOT}/Modules/FindOpenAL.cmake")
|
||||
|
||||
if(OPENAL_FOUND)
|
||||
if(OPENAL_FOUND AND NOT TARGET OpenAL::OpenAL)
|
||||
add_library(OpenAL::OpenAL UNKNOWN IMPORTED)
|
||||
set_target_properties(OpenAL::OpenAL PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C;CXX"
|
||||
|
@ -1,6 +1,6 @@
|
||||
include("${CMAKE_ROOT}/Modules/FindOpenGL.cmake")
|
||||
|
||||
if(OPENGL_FOUND)
|
||||
if(OPENGL_FOUND AND NOT TARGET OpenGL::OpenGL)
|
||||
list(GET OPENGL_LIBRARIES 0 OPENGL_FIRST_LIBRARY)
|
||||
set(OPENGL_OTHER_LIBRARIES "${OPENGL_LIBRARIES}")
|
||||
list(REMOVE_AT OPENGL_OTHER_LIBRARIES 0)
|
||||
|
@ -195,7 +195,7 @@ IF(SDL2_STATIC)
|
||||
ENDIF()
|
||||
ENDIF(SDL2_STATIC)
|
||||
|
||||
if(SDL2_FOUND)
|
||||
if(SDL2_FOUND AND NOT TARGET SDL2::SDL2)
|
||||
set(SDL2_EXTRA_LIBS "${SDL2_LIBRARY_TEMP}")
|
||||
list(REMOVE_ITEM SDL2_EXTRA_LIBS "${SDL2_LIBRARY_PATH}")
|
||||
add_library(SDL2::SDL2 UNKNOWN IMPORTED)
|
||||
|
Loading…
Reference in New Issue
Block a user