Защита от повторного создания целей
This commit is contained in:
parent
4d0ab57039
commit
2eefa49c6e
@ -247,7 +247,7 @@ endif( FFTW_ROOT )
|
|||||||
|
|
||||||
#--------------------------------------- components
|
#--------------------------------------- components
|
||||||
|
|
||||||
if (FFTW_DOUBLE_LIB)
|
if (FFTW_DOUBLE_LIB AND NOT TARGET FFTW::Double)
|
||||||
set(FFTW_DOUBLE_LIB_FOUND TRUE)
|
set(FFTW_DOUBLE_LIB_FOUND TRUE)
|
||||||
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_LIB})
|
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_LIB})
|
||||||
add_library(FFTW::Double INTERFACE IMPORTED)
|
add_library(FFTW::Double INTERFACE IMPORTED)
|
||||||
@ -259,7 +259,7 @@ else()
|
|||||||
set(FFTW_DOUBLE_LIB_FOUND FALSE)
|
set(FFTW_DOUBLE_LIB_FOUND FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (FFTW_FLOAT_LIB)
|
if (FFTW_FLOAT_LIB AND NOT TARGET FFTW::Float)
|
||||||
set(FFTW_FLOAT_LIB_FOUND TRUE)
|
set(FFTW_FLOAT_LIB_FOUND TRUE)
|
||||||
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_LIB})
|
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_LIB})
|
||||||
add_library(FFTW::Float INTERFACE IMPORTED)
|
add_library(FFTW::Float INTERFACE IMPORTED)
|
||||||
@ -271,7 +271,7 @@ else()
|
|||||||
set(FFTW_FLOAT_LIB_FOUND FALSE)
|
set(FFTW_FLOAT_LIB_FOUND FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (FFTW_LONGDOUBLE_LIB)
|
if (FFTW_LONGDOUBLE_LIB AND NOT TARGET FFTW::LongDouble)
|
||||||
set(FFTW_LONGDOUBLE_LIB_FOUND TRUE)
|
set(FFTW_LONGDOUBLE_LIB_FOUND TRUE)
|
||||||
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_LIB})
|
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_LIB})
|
||||||
add_library(FFTW::LongDouble INTERFACE IMPORTED)
|
add_library(FFTW::LongDouble INTERFACE IMPORTED)
|
||||||
@ -283,7 +283,7 @@ else()
|
|||||||
set(FFTW_LONGDOUBLE_LIB_FOUND FALSE)
|
set(FFTW_LONGDOUBLE_LIB_FOUND FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (FFTW_DOUBLE_THREADS_LIB)
|
if (FFTW_DOUBLE_THREADS_LIB AND NOT TARGET FFTW::DoubleThreads)
|
||||||
set(FFTW_DOUBLE_THREADS_LIB_FOUND TRUE)
|
set(FFTW_DOUBLE_THREADS_LIB_FOUND TRUE)
|
||||||
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_THREADS_LIB})
|
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_THREADS_LIB})
|
||||||
add_library(FFTW::DoubleThreads INTERFACE IMPORTED)
|
add_library(FFTW::DoubleThreads INTERFACE IMPORTED)
|
||||||
@ -295,7 +295,7 @@ else()
|
|||||||
set(FFTW_DOUBLE_THREADS_LIB_FOUND FALSE)
|
set(FFTW_DOUBLE_THREADS_LIB_FOUND FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (FFTW_FLOAT_THREADS_LIB)
|
if (FFTW_FLOAT_THREADS_LIB AND NOT TARGET FFTW::FloatThreads)
|
||||||
set(FFTW_FLOAT_THREADS_LIB_FOUND TRUE)
|
set(FFTW_FLOAT_THREADS_LIB_FOUND TRUE)
|
||||||
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_THREADS_LIB})
|
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_THREADS_LIB})
|
||||||
add_library(FFTW::FloatThreads INTERFACE IMPORTED)
|
add_library(FFTW::FloatThreads INTERFACE IMPORTED)
|
||||||
@ -307,7 +307,7 @@ else()
|
|||||||
set(FFTW_FLOAT_THREADS_LIB_FOUND FALSE)
|
set(FFTW_FLOAT_THREADS_LIB_FOUND FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (FFTW_LONGDOUBLE_THREADS_LIB)
|
if (FFTW_LONGDOUBLE_THREADS_LIB AND NOT TARGET FFTW::LongDoubleThreads)
|
||||||
set(FFTW_LONGDOUBLE_THREADS_LIB_FOUND TRUE)
|
set(FFTW_LONGDOUBLE_THREADS_LIB_FOUND TRUE)
|
||||||
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_THREADS_LIB})
|
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_THREADS_LIB})
|
||||||
add_library(FFTW::LongDoubleThreads INTERFACE IMPORTED)
|
add_library(FFTW::LongDoubleThreads INTERFACE IMPORTED)
|
||||||
@ -319,7 +319,7 @@ else()
|
|||||||
set(FFTW_LONGDOUBLE_THREADS_LIB_FOUND FALSE)
|
set(FFTW_LONGDOUBLE_THREADS_LIB_FOUND FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (FFTW_DOUBLE_OPENMP_LIB)
|
if (FFTW_DOUBLE_OPENMP_LIB AND NOT TARGET FFTW::DoubleOpenMP)
|
||||||
set(FFTW_DOUBLE_OPENMP_LIB_FOUND TRUE)
|
set(FFTW_DOUBLE_OPENMP_LIB_FOUND TRUE)
|
||||||
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_OPENMP_LIB})
|
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_OPENMP_LIB})
|
||||||
add_library(FFTW::DoubleOpenMP INTERFACE IMPORTED)
|
add_library(FFTW::DoubleOpenMP INTERFACE IMPORTED)
|
||||||
@ -331,7 +331,7 @@ else()
|
|||||||
set(FFTW_DOUBLE_OPENMP_LIB_FOUND FALSE)
|
set(FFTW_DOUBLE_OPENMP_LIB_FOUND FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (FFTW_FLOAT_OPENMP_LIB)
|
if (FFTW_FLOAT_OPENMP_LIB AND NOT TARGET FFTW::FloatOpenMP)
|
||||||
set(FFTW_FLOAT_OPENMP_LIB_FOUND TRUE)
|
set(FFTW_FLOAT_OPENMP_LIB_FOUND TRUE)
|
||||||
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_OPENMP_LIB})
|
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_OPENMP_LIB})
|
||||||
add_library(FFTW::FloatOpenMP INTERFACE IMPORTED)
|
add_library(FFTW::FloatOpenMP INTERFACE IMPORTED)
|
||||||
@ -343,7 +343,7 @@ else()
|
|||||||
set(FFTW_FLOAT_OPENMP_LIB_FOUND FALSE)
|
set(FFTW_FLOAT_OPENMP_LIB_FOUND FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (FFTW_LONGDOUBLE_OPENMP_LIB)
|
if (FFTW_LONGDOUBLE_OPENMP_LIB AND NOT TARGET FFTW::LongDoubleOpenMP)
|
||||||
set(FFTW_LONGDOUBLE_OPENMP_LIB_FOUND TRUE)
|
set(FFTW_LONGDOUBLE_OPENMP_LIB_FOUND TRUE)
|
||||||
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_OPENMP_LIB})
|
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_OPENMP_LIB})
|
||||||
add_library(FFTW::LongDoubleOpenMP INTERFACE IMPORTED)
|
add_library(FFTW::LongDoubleOpenMP INTERFACE IMPORTED)
|
||||||
@ -355,7 +355,7 @@ else()
|
|||||||
set(FFTW_LONGDOUBLE_OPENMP_LIB_FOUND FALSE)
|
set(FFTW_LONGDOUBLE_OPENMP_LIB_FOUND FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (FFTW_DOUBLE_MPI_LIB)
|
if (FFTW_DOUBLE_MPI_LIB AND NOT TARGET FFTW::DoubleMPI)
|
||||||
set(FFTW_DOUBLE_MPI_LIB_FOUND TRUE)
|
set(FFTW_DOUBLE_MPI_LIB_FOUND TRUE)
|
||||||
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_MPI_LIB})
|
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_DOUBLE_MPI_LIB})
|
||||||
add_library(FFTW::DoubleMPI INTERFACE IMPORTED)
|
add_library(FFTW::DoubleMPI INTERFACE IMPORTED)
|
||||||
@ -367,7 +367,7 @@ else()
|
|||||||
set(FFTW_DOUBLE_MPI_LIB_FOUND FALSE)
|
set(FFTW_DOUBLE_MPI_LIB_FOUND FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (FFTW_FLOAT_MPI_LIB)
|
if (FFTW_FLOAT_MPI_LIB AND NOT TARGET FFTW::FloatMPI)
|
||||||
set(FFTW_FLOAT_MPI_LIB_FOUND TRUE)
|
set(FFTW_FLOAT_MPI_LIB_FOUND TRUE)
|
||||||
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_MPI_LIB})
|
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_FLOAT_MPI_LIB})
|
||||||
add_library(FFTW::FloatMPI INTERFACE IMPORTED)
|
add_library(FFTW::FloatMPI INTERFACE IMPORTED)
|
||||||
@ -379,7 +379,7 @@ else()
|
|||||||
set(FFTW_FLOAT_MPI_LIB_FOUND FALSE)
|
set(FFTW_FLOAT_MPI_LIB_FOUND FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (FFTW_LONGDOUBLE_MPI_LIB)
|
if (FFTW_LONGDOUBLE_MPI_LIB AND NOT TARGET FFTW::LongDoubleMPI)
|
||||||
set(FFTW_LONGDOUBLE_MPI_LIB_FOUND TRUE)
|
set(FFTW_LONGDOUBLE_MPI_LIB_FOUND TRUE)
|
||||||
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_MPI_LIB})
|
set(FFTW_LIBRARIES ${FFTW_LIBRARIES} ${FFTW_LONGDOUBLE_MPI_LIB})
|
||||||
add_library(FFTW::LongDoubleMPI INTERFACE IMPORTED)
|
add_library(FFTW::LongDoubleMPI INTERFACE IMPORTED)
|
||||||
|
@ -24,7 +24,7 @@ find_library(MATHGL_QT5_LIBRARIES NAMES mgl-qt5 mgl2-qt5
|
|||||||
/usr/local/include
|
/usr/local/include
|
||||||
)
|
)
|
||||||
|
|
||||||
if(MATHGL_INCLUDE_DIR AND MATHGL_LIBRARIES)
|
if(MATHGL_INCLUDE_DIR AND MATHGL_LIBRARIES AND NOT TARGET MathGL::Mgl AND NOT TARGET MathGL::Qt5)
|
||||||
get_filename_component(MATHGL_LIBRARY_DIR ${MATHGL_LIBRARIES} PATH)
|
get_filename_component(MATHGL_LIBRARY_DIR ${MATHGL_LIBRARIES} PATH)
|
||||||
set(MATHGL_FOUND TRUE)
|
set(MATHGL_FOUND TRUE)
|
||||||
add_library(MathGL::Mgl INTERFACE IMPORTED)
|
add_library(MathGL::Mgl INTERFACE IMPORTED)
|
||||||
|
@ -31,7 +31,7 @@ int main(void){
|
|||||||
}" QUADMATH_FOUND)
|
}" QUADMATH_FOUND)
|
||||||
cmake_pop_check_state()
|
cmake_pop_check_state()
|
||||||
|
|
||||||
if (QUADMATH_FOUND)
|
if (QUADMATH_FOUND AND NOT TARGET QuadMath::QuadMath)
|
||||||
set(QUADMATH_LIBRARIES "quadmath")
|
set(QUADMATH_LIBRARIES "quadmath")
|
||||||
set(HAVE_QUAD "${QUADMATH_FOUND}")
|
set(HAVE_QUAD "${QUADMATH_FOUND}")
|
||||||
add_library(QuadMath::QuadMath INTERFACE IMPORTED)
|
add_library(QuadMath::QuadMath INTERFACE IMPORTED)
|
||||||
|
Loading…
Reference in New Issue
Block a user