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
25acf39d
Commit
25acf39d
authored
11 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
trying to fix dynamic windows build
parent
e051f352
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+26
-22
26 additions, 22 deletions
CMakeLists.txt
with
26 additions
and
22 deletions
CMakeLists.txt
+
26
−
22
View file @
25acf39d
...
@@ -1240,6 +1240,7 @@ if(WIN32 AND NOT MSVC OR CYGWIN)
...
@@ -1240,6 +1240,7 @@ if(WIN32 AND NOT MSVC OR CYGWIN)
set
(
FLAGS
"
${
FLAGS
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/Fltk/Win32Icon.res"
)
set
(
FLAGS
"
${
FLAGS
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/Fltk/Win32Icon.res"
)
endif
(
HAVE_64BIT_SIZE_T
)
endif
(
HAVE_64BIT_SIZE_T
)
if
(
ENABLE_BUILD_DYNAMIC
)
if
(
ENABLE_BUILD_DYNAMIC
)
set
(
FLAGS
"
${
FLAGS
}
-Wl,-Bstatic -lgfortran"
)
set_target_properties
(
gmsh PROPERTIES
set_target_properties
(
gmsh PROPERTIES
LINK_FLAGS
"
${
FLAGS
}
-Wl,--enable-auto-import"
)
LINK_FLAGS
"
${
FLAGS
}
-Wl,--enable-auto-import"
)
set
(
LIBGMSH_DEF
"libGmsh-
${
GMSH_MAJOR_VERSION
}
.
${
GMSH_MINOR_VERSION
}
.def"
)
set
(
LIBGMSH_DEF
"libGmsh-
${
GMSH_MAJOR_VERSION
}
.
${
GMSH_MINOR_VERSION
}
.def"
)
...
@@ -1355,16 +1356,17 @@ if(ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC)
...
@@ -1355,16 +1356,17 @@ if(ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC)
# install .def file
# install .def file
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
LIBGMSH_DEF
}
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
LIBGMSH_DEF
}
DESTINATION
${
GMSH_LIB
}
)
DESTINATION
${
GMSH_LIB
}
)
# install these DLLs until we figure out how to link them in statically
# install these DLLs until we figure out how to link them in statically (libstc++ and
# NB (using mingw-w64):
# libgcc should be linkable statically with -static-libstdc++ and -static-libgcc but with
# stc++ can be linked statically with -static-libstdc++
# current mingw64 toolchain it does not work). Also, when cross-compilating find_program
# gfortran with -Wl,-Bstatic -lgfortran (-static-libgfortran does not work
# does not work -> ask the compiler instead
# for c++ linker)
if
(
HAVE_64BIT_SIZE_T
)
# unfortunately -static-libgcc causes link error here (multiple definition
find_program
(
GCC_DLL libgcc_s_sjlj-1.dll
)
# of ...)
else
(
HAVE_64BIT_SIZE_T
)
# Also, find_program does not work in cross-compilation mode -> ask the compiler instead
find_program
(
GCC_DLL libgcc_s_seh-1.dll
)
execute_process
(
COMMAND
${
CMAKE_CXX_COMPILER
}
-print-file-name=libgfortran-3.dll
endif
(
HAVE_64BIT_SIZE_T
)
OUTPUT_VARIABLE GFORTRAN_DLL OUTPUT_STRIP_TRAILING_WHITESPACE
)
find_program
(
STDC_DLL libstdc++-6.dll
)
if
(
NOT GCC_DLL
)
if
(
HAVE_64BIT_SIZE_T
)
if
(
HAVE_64BIT_SIZE_T
)
execute_process
(
COMMAND
${
CMAKE_CXX_COMPILER
}
-print-file-name=libgcc_s_seh-1.dll
execute_process
(
COMMAND
${
CMAKE_CXX_COMPILER
}
-print-file-name=libgcc_s_seh-1.dll
OUTPUT_VARIABLE GCC_DLL OUTPUT_STRIP_TRAILING_WHITESPACE
)
OUTPUT_VARIABLE GCC_DLL OUTPUT_STRIP_TRAILING_WHITESPACE
)
...
@@ -1372,15 +1374,17 @@ if(ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC)
...
@@ -1372,15 +1374,17 @@ if(ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC)
execute_process
(
COMMAND
${
CMAKE_CXX_COMPILER
}
-print-file-name=libgcc_s_sjlj-1.dll
execute_process
(
COMMAND
${
CMAKE_CXX_COMPILER
}
-print-file-name=libgcc_s_sjlj-1.dll
OUTPUT_VARIABLE GCC_DLL OUTPUT_STRIP_TRAILING_WHITESPACE
)
OUTPUT_VARIABLE GCC_DLL OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif
(
HAVE_64BIT_SIZE_T
)
endif
(
HAVE_64BIT_SIZE_T
)
get_filename_component
(
GCC_DLL
${
GCC_DLL
}
ABSOLUTE
)
endif
(
NOT GCC_DLL
)
if
(
NOT STDC_DLL
)
execute_process
(
COMMAND
${
CMAKE_CXX_COMPILER
}
-print-file-name=libstdc++-6.dll
execute_process
(
COMMAND
${
CMAKE_CXX_COMPILER
}
-print-file-name=libstdc++-6.dll
OUTPUT_VARIABLE STDC_DLL OUTPUT_STRIP_TRAILING_WHITESPACE
)
OUTPUT_VARIABLE STDC_DLL OUTPUT_STRIP_TRAILING_WHITESPACE
)
get_filename_component
(
STD_DLL
${
STDC_DLL
}
ABSOLUTE
)
get_filename_component
(
STD_DLL
${
STDC_DLL
}
ABSOLUTE
)
get_filename_component
(
GFORTRAN_DLL
${
GFORTRAN_DLL
}
ABSOLUTE
)
endif
(
NOT STDC_DLL
)
get_filename_component
(
GCC_DLL
${
GCC_DLL
}
ABSOLUTE
)
if
(
GCC_DLL AND STDC_DLL
)
if
(
GCC_DLL AND GFORTRAN_DLL AND STDC_DLL
)
message
(
STATUS
"Will install extra DLLs for Windows"
)
message
(
STATUS
"Will install extra DLLs for Windows"
)
install
(
FILES
${
GCC_DLL
}
${
GFORTRAN_DLL
}
${
STDC_DLL
}
DESTINATION
${
GMSH_LIB
}
)
install
(
FILES
${
GCC_DLL
}
${
STDC_DLL
}
DESTINATION
${
GMSH_LIB
}
)
endif
(
GCC_DLL AND
GFORTRAN_DLL AND
STDC_DLL
)
endif
(
GCC_DLL AND STDC_DLL
)
else
(
WIN32 AND NOT MSVC OR CYGWIN
)
else
(
WIN32 AND NOT MSVC OR CYGWIN
)
install
(
TARGETS shared DESTINATION
${
GMSH_LIB
}
OPTIONAL
)
install
(
TARGETS shared DESTINATION
${
GMSH_LIB
}
OPTIONAL
)
endif
(
WIN32 AND NOT MSVC OR CYGWIN
)
endif
(
WIN32 AND NOT MSVC OR CYGWIN
)
...
...
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