Skip to content
Snippets Groups Projects
Commit d06ecd98 authored by Alexis Girault's avatar Alexis Girault
Browse files

COMP: Update CMAKE_MODULE_PATH

Also no need to do the find packages in the
config file: if this file exists and is found
it means that VegaFEM dependencies are built
and found since those occur earlier in the
top level CMakeLists.txt
parent 97409ff5
No related branches found
No related tags found
No related merge requests found
set(BUILD_UTILITIES @VegaFEM_BUILD_UTILITIES@)
set(BUILD_MODEL_REDUCTION @VegaFEM_BUILD_MODEL_REDUCTION@)
set(ENABLE_ExpoKit_SUPPORT @VegaFEM_ENABLE_ExpoKit_SUPPORT@)
set(ENABLE_OpenGL_SUPPORT @VegaFEM_ENABLE_OpenGL_SUPPORT@)
set(ENABLE_PTHREADS_SUPPORT @VegaFEM_ENABLE_PTHREADS_SUPPORT@)
if (ENABLE_OpenGL_SUPPORT)
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
find_package(GLEW REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
include_directories(${GLUT_INCLUDE_DIR})
include_directories(${GLEW_INCLUDE_DIR})
if (GLUT_FOUND AND APPLE)
mark_as_advanced(GLUT_cocoa_LIBRARY)
endif()
if (ENABLE_Cg_SUPPORT)
find_package(Cg REQUIRED)
mark_as_advanced(
CG_COMPILER
CG_GL_LIBRARY
CG_INCLUDE_PATH
CG_LIBRARY
)
endif()
endif()
if(ENABLE_PTHREADS_SUPPORT)
if(WIN32)
set(THREADS_USE_PTHREADS_WIN32 1)
find_package(PThreads REQUIRED)
else()
find_package(Threads REQUIRED)
endif()
endif()
if (BUILD_MODEL_REDUCTION)
if (NOT APPLE)
find_package(MKL)
if(MKL_FOUND)
set(BLA_VENDOR "Intel mkl")
include_directories(${INTEL_MKL_INCLUDE_DIR})
# TODO: set option for the paradiso solvers and define PARDISO_SOLVER_IS_AVAILABLE
else()
find_package(LAPACKE REQUIRED) # Also searches for cblas
find_package(LAPACK REQUIRED)
include_directories(${LAPACKE_INCLUDE_DIR})
include_directories(${CBLAS_INCLUDE_DIR})
endif()
endif()
endif()
if (ENABLE_OpenGL_SUPPORT AND BUILD_UTILITIES)
find_package(GLUI)
if(NOT GLUI_FOUND)
add_subdirectory(@CMAKE_CURRENT_SOURCE_DIR@/thirdparty/glui/2.36/src)
set(GLUI_LIBRARY glui)
set(GLUI_INCLUDE_DIR) # Empty this as library will export its own includes.
endif()
endif()
include("${CMAKE_CURRENT_LIST_DIR}/VegaFEMTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/VegaFEMTargets.cmake")
\ No newline at end of file
......@@ -21,11 +21,7 @@ if(COMMAND CMAKE_POLICY)
endif()
endif(COMMAND CMAKE_POLICY)
if(NOT IS_SUBBUILD)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH};")
else(NOT IS_SUBBUILD)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/CMake")
endif(NOT IS_SUBBUILD)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
include(CMakePackageConfigHelpers)
include(VegaFEMMacros)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment