mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
CMake: Use proper target_use_packages definitions for Eigen
This commit is contained in:
parent
2399655920
commit
5c4ef25bb7
@ -412,12 +412,6 @@ mark_as_advanced(ANDROID_NDK_HOME ANDROID_ABI ANDROID_STL
|
||||
# Now let's check for the presence of various thirdparty libraries.
|
||||
#
|
||||
|
||||
# Always include Eigen, because we include it pretty much everywhere.
|
||||
if(EIGEN3_FOUND)
|
||||
include_directories(${EIGEN3_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
|
||||
# Is Python installed, and should Python interfaces be generated?
|
||||
set(WANT_PYTHON_VERSION "2.7"
|
||||
CACHE STRING "Which Python version to seek out for building Panda3D against.")
|
||||
|
@ -3,10 +3,6 @@
|
||||
#
|
||||
find_package(Eigen3 QUIET)
|
||||
|
||||
if(Eigen3_FOUND)
|
||||
set(EIGEN_FOUND ON)
|
||||
endif()
|
||||
|
||||
package_option(EIGEN
|
||||
"Enables experimental support for the Eigen linear algebra library.
|
||||
If this is provided, Panda will use this library as the fundamental
|
||||
@ -14,6 +10,7 @@ implementation of its own linmath library; otherwise, it will use
|
||||
its own internal implementation. The primary advantage of using
|
||||
Eigen is SSE2 support, which is only activated if LINMATH_ALIGN
|
||||
is also enabled."
|
||||
FOUND_AS EIGEN3
|
||||
LICENSE "MPL-2")
|
||||
|
||||
option(LINMATH_ALIGN
|
||||
|
@ -73,7 +73,7 @@ add_library(p3dtoolbase ${P3DTOOLBASE_HEADERS} ${P3DTOOLBASE_SOURCES})
|
||||
# The extensions need py_panda.h and extension.h from interrogatedb
|
||||
target_include_directories(p3dtoolbase PUBLIC
|
||||
$<TARGET_PROPERTY:p3interrogatedb,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
target_use_packages(p3dtoolbase THREADS)
|
||||
target_use_packages(p3dtoolbase THREADS EIGEN)
|
||||
target_interrogate(p3dtoolbase ${P3DTOOLBASE_SOURCES} EXTENSIONS ${P3DTOOLBASE_IGATEEXT})
|
||||
|
||||
install(TARGETS p3dtoolbase DESTINATION lib)
|
||||
|
@ -5,9 +5,6 @@ endif()
|
||||
# Not sure where I want to hide these inludes yet, but it is annoying
|
||||
# to have to add them to every CMakeLists that either directly, or
|
||||
# recursively includes linmath, and other libraries etc...
|
||||
if(HAVE_EIGEN)
|
||||
include_directories(${EIGEN3_INCLUDE_DIR})
|
||||
endif()
|
||||
if(HAVE_FFTW)
|
||||
include_directories(${FFTW2_INCLUDE_DIR})
|
||||
endif()
|
||||
|
@ -46,6 +46,7 @@ set(P3LINMATH_SOURCES
|
||||
composite_sources(p3linmath P3LINMATH_SOURCES)
|
||||
add_library(p3linmath ${P3LINMATH_HEADERS} ${P3LINMATH_SOURCES})
|
||||
target_link_libraries(p3linmath p3express p3pandabase)
|
||||
target_use_packages(p3linmath EIGEN)
|
||||
target_interrogate(p3linmath ALL)
|
||||
|
||||
install(TARGETS p3linmath DESTINATION lib)
|
||||
|
Loading…
x
Reference in New Issue
Block a user