cmake: fix tox library detection
This commit is contained in:
parent
e02b051bb2
commit
1cc1aa2a2f
@ -24,10 +24,8 @@ find_path(Tox_CORE_INCLUDE_DIR tox/tox.h)
|
|||||||
find_library(Tox_CORE_LIBRARY toxcore)
|
find_library(Tox_CORE_LIBRARY toxcore)
|
||||||
|
|
||||||
find_path(Tox_AV_INCLUDE_DIR tox/toxav.h)
|
find_path(Tox_AV_INCLUDE_DIR tox/toxav.h)
|
||||||
find_library(Tox_AV_LIBRARY toxav)
|
|
||||||
|
|
||||||
find_path(Tox_ENCRYPTSAVE_INCLUDE_DIR tox/toxencryptsave.h)
|
find_path(Tox_ENCRYPTSAVE_INCLUDE_DIR tox/toxencryptsave.h)
|
||||||
find_library(Tox_ENCRYPTSAVE_LIBRARY toxencryptsave)
|
|
||||||
|
|
||||||
if(Tox_CORE_INCLUDE_DIR AND Tox_CORE_LIBRARY)
|
if(Tox_CORE_INCLUDE_DIR AND Tox_CORE_LIBRARY)
|
||||||
set(Tox_CORE_FOUND TRUE)
|
set(Tox_CORE_FOUND TRUE)
|
||||||
@ -35,16 +33,14 @@ if(Tox_CORE_INCLUDE_DIR AND Tox_CORE_LIBRARY)
|
|||||||
list(APPEND Tox_LIBRARIES "${Tox_CORE_LIBRARY}")
|
list(APPEND Tox_LIBRARIES "${Tox_CORE_LIBRARY}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(Tox_AV_INCLUDE_DIR AND Tox_AV_LIBRARY)
|
if(Tox_AV_INCLUDE_DIR)
|
||||||
set(Tox_AV_FOUND TRUE)
|
set(Tox_AV_FOUND TRUE)
|
||||||
list(APPEND Tox_INCLUDE_DIRS "${Tox_AV_INCLUDE_DIR}")
|
list(APPEND Tox_INCLUDE_DIRS "${Tox_AV_INCLUDE_DIR}")
|
||||||
list(APPEND Tox_LIBRARIES "${Tox_AV_LIBRARY}")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(Tox_ENCRYPTSAVE_INCLUDE_DIR AND Tox_ENCRYPTSAVE_LIBRARY)
|
if(Tox_ENCRYPTSAVE_INCLUDE_DIR)
|
||||||
set(Tox_ENCRYPTSAVE_FOUND TRUE)
|
set(Tox_ENCRYPTSAVE_FOUND TRUE)
|
||||||
list(APPEND Tox_INCLUDE_DIRS "${Tox_ENCRYPTSAVE_INCLUDE_DIR}")
|
list(APPEND Tox_INCLUDE_DIRS "${Tox_ENCRYPTSAVE_INCLUDE_DIR}")
|
||||||
list(APPEND Tox_LIBRARIES "${Tox_ENCRYPTSAVE_LIBRARY}")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(REMOVE_DUPLICATES Tox_INCLUDE_DIRS)
|
list(REMOVE_DUPLICATES Tox_INCLUDE_DIRS)
|
||||||
|
Loading…
Reference in New Issue
Block a user