Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
74382835
Commit
74382835
authored
15 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
better link libs for external targets
parent
a79bc64b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+21
-21
21 additions, 21 deletions
CMakeLists.txt
contrib/arc/CMakeLists.txt
+4
-6
4 additions, 6 deletions
contrib/arc/CMakeLists.txt
with
25 additions
and
27 deletions
CMakeLists.txt
+
21
−
21
View file @
74382835
...
...
@@ -17,7 +17,7 @@ endif(DEFINED CMAKE_BUILD_TYPE)
project
(
gmsh CXX C
)
option
(
ENABLE_ANN
"Enable ANN to compute Approximate Nearest Neighbors"
ON
)
option
(
ENABLE_ARC
"Enable ARC-related
projec
ts"
OFF
)
option
(
ENABLE_ARC
"Enable ARC-related
binary targe
ts"
OFF
)
option
(
ENABLE_BLAS_LAPACK
"Use BLAS/Lapack for basic linear algebra"
ON
)
option
(
ENABLE_CGNS
"Enable CGNS mesh export"
OFF
)
option
(
ENABLE_CHACO
"Enable Chaco mesh partitioner"
ON
)
...
...
@@ -686,6 +686,19 @@ if(EXTERNAL_INCLUDES)
list
(
REMOVE_DUPLICATES EXTERNAL_INCLUDES
)
endif
(
EXTERNAL_INCLUDES
)
if
(
HAVE_FLTK
)
set
(
LINK_LIBRARIES
${
FLTK_LIBRARIES
}
${
EXTERNAL_LIBRARIES
}
${
OPENGL_LIBRARIES
}
${
LAPACK_LIBRARIES
}
)
elseif
(
HAVE_QT
)
set
(
LINK_LIBRARIES
${
QT_LIBRARIES
}
${
EXTERNAL_LIBRARIES
}
${
OPENGL_LIBRARIES
}
${
LAPACK_LIBRARIES
}
)
elseif
(
HAVE_OPENGL
)
set
(
LINK_LIBRARIES
${
EXTERNAL_LIBRARIES
}
${
OPENGL_LIBRARIES
}
${
LAPACK_LIBRARIES
}
)
else
(
HAVE_FLTK
)
set
(
LINK_LIBRARIES
${
EXTERNAL_LIBRARIES
}
${
LAPACK_LIBRARIES
}
)
endif
(
HAVE_FLTK
)
# we could specify include dirs more selectively, but this is simpler
include_directories
(
Common Fltk Geo Graphics Mesh Solver Numeric Parser Plugin
Post Qt contrib/ANN/include contrib/Chaco/main contrib/DiscreteIntegration
...
...
@@ -722,38 +735,20 @@ set_target_properties(shared PROPERTIES OUTPUT_NAME Gmsh)
if
(
HAVE_LAPACK AND LAPACK_FLAGS
)
set_target_properties
(
shared PROPERTIES LINK_FLAGS
${
LAPACK_FLAGS
}
)
endif
(
HAVE_LAPACK AND LAPACK_FLAGS
)
if
(
HAVE_FLTK
)
target_link_libraries
(
shared
${
FLTK_LIBRARIES
}
${
EXTERNAL_LIBRARIES
}
${
OPENGL_LIBRARIES
}
${
LAPACK_LIBRARIES
}
)
elseif
(
HAVE_OPENGL
)
target_link_libraries
(
shared
${
EXTERNAL_LIBRARIES
}
${
OPENGL_LIBRARIES
}
${
LAPACK_LIBRARIES
}
)
else
(
HAVE_FLTK
)
target_link_libraries
(
shared
${
EXTERNAL_LIBRARIES
}
${
LAPACK_LIBRARIES
}
)
endif
(
HAVE_FLTK
)
target_link_libraries
(
shared
${
LINK_LIBRARIES
}
)
# binary targets
if
(
HAVE_FLTK
)
add_executable
(
gmsh WIN32 Fltk/Main.cpp
${
GMSH_SRC
}
)
target_link_libraries
(
gmsh
${
FLTK_LIBRARIES
}
${
EXTERNAL_LIBRARIES
}
${
OPENGL_LIBRARIES
}
${
LAPACK_LIBRARIES
}
)
elseif
(
HAVE_QT
)
qt4_wrap_cpp
(
GMSH_MOC_SRC
${
GMSH_MOC_HDR
}
)
add_executable
(
gmsh WIN32 Qt/Main.cpp
${
GMSH_SRC
}
${
GMSH_MOC_SRC
}
)
target_link_libraries
(
gmsh
${
QT_LIBRARIES
}
${
EXTERNAL_LIBRARIES
}
${
OPENGL_LIBRARIES
}
${
LAPACK_LIBRARIES
}
)
elseif
(
HAVE_OPENGL
)
add_executable
(
gmsh Common/Main.cpp
${
GMSH_SRC
}
)
target_link_libraries
(
gmsh
${
EXTERNAL_LIBRARIES
}
${
OPENGL_LIBRARIES
}
${
LAPACK_LIBRARIES
}
)
else
(
HAVE_FLTK
)
add_executable
(
gmsh Common/Main.cpp
${
GMSH_SRC
}
)
target_link_libraries
(
gmsh
${
EXTERNAL_LIBRARIES
}
${
LAPACK_LIBRARIES
}
)
endif
(
HAVE_FLTK
)
if
(
ENABLE_ARC
)
include
(
contrib/arc/CMakeLists.txt
)
endif
(
ENABLE_ARC
)
target_link_libraries
(
gmsh
${
LINK_LIBRARIES
}
)
# increase stack to 16Mb on Windows to avoid overflows in recursive
# tet classification for large 3D Delaunay grids
...
...
@@ -764,6 +759,11 @@ elseif(MSVC)
set_target_properties
(
gmsh PROPERTIES LINK_FLAGS
"/STACK:16777216"
)
endif
(
CYGWIN
)
# contrib binary targets
if
(
ENABLE_ARC
)
include
(
contrib/arc/CMakeLists.txt
)
endif
(
ENABLE_ARC
)
find_program
(
BISON bison
)
find_program
(
FLEX flex
)
if
(
BISON AND FLEX
)
...
...
This diff is collapsed.
Click to expand it.
contrib/arc/CMakeLists.txt
+
4
−
6
View file @
74382835
# pour boris!
# pour boris:
add_executable
(
boris EXCLUDE_FROM_ALL contrib/arc/boris.cpp
${
GMSH_SRC
}
)
target_link_libraries
(
boris
${
EXTERNAL_LIBRARIES
}
${
LAPAC
K_LIBRARIES
}
)
target_link_libraries
(
boris
${
LIN
K_LIBRARIES
}
)
# tests pour eric et christophe
# tests pour eric et christophe
:
add_executable
(
elastic EXCLUDE_FROM_ALL contrib/arc/mainElasticity.cpp
${
GMSH_SRC
}
)
target_link_libraries
(
elastic
${
EXTERNAL_LIBRARIES
}
${
LAPAC
K_LIBRARIES
}
)
target_link_libraries
(
elastic
${
LIN
K_LIBRARIES
}
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment