Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
5edb5a05
Commit
5edb5a05
authored
Jun 21, 2019
by
Max Lyon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'NewCmakeFinders' into CMakeSimplification
# Conflicts: # cmake/FindCGAL.cmake
parents
1a794421
79916b47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
151 additions
and
6 deletions
+151
-6
cmake/FindGeogram.cmake
cmake/FindGeogram.cmake
+144
-0
cmake/FindPhySim.cmake
cmake/FindPhySim.cmake
+7
-6
No files found.
cmake/FindGeogram.cmake
0 → 100644
View file @
5edb5a05
# Find Geogram
# ------------
#
# Find Geogram include dirs and libraries
#
# This module defines the following variables:
#
# Geogram_FOUND - True if geogram has been found.
# Geogram::geogram - Imported target for the main Geogram library.
# Geogram::geogram_gfx - Imported target for Geogram graphics library.
#
# This module reads hints about the Geogram location from the following
# environment variables:
#
# GEOGRAM_INSTALL_PREFIX - Directory where Geogram is installed.
#
# Authors: Jeremie Dumas
# Pierre Moulon
# Bruno Levy
set
(
GEOGRAM_SEARCH_PATHS
${
GEOGRAM_INSTALL_PREFIX
}
"$ENV{GEOGRAM_INSTALL_PREFIX}"
"/usr/local/"
"$ENV{PROGRAMFILES}/Geogram"
"$ENV{PROGRAMW6432}/Geogram"
)
set
(
GEOGRAM_SEARCH_PATHS_SYSTEM
"/usr/lib"
"/usr/lib/
${
CMAKE_LIBRARY_ARCHITECTURE
}
"
)
find_path
(
GEOGRAM_INCLUDE_DIR
geogram/basic/common.h
PATHS
${
GEOGRAM_SEARCH_PATHS
}
PATH_SUFFIXES include/geogram1
)
find_library
(
GEOGRAM_LIBRARY
NAMES geogram
PATHS
${
GEOGRAM_SEARCH_PATHS
}
PATH_SUFFIXES lib
)
find_library
(
GEOGRAM_GFX_LIBRARY
NAMES geogram_gfx
PATHS
${
GEOGRAM_SEARCH_PATHS
}
PATH_SUFFIXES lib
)
# This one we search in both Geogram search path and
# system search path since it may be already installed
# in the system
find_library
(
GEOGRAM_GLFW3_LIBRARY
NAMES glfw3 glfw geogram_glfw3
PATHS
${
GEOGRAM_SEARCH_PATHS
}
${
GEOGRAM_SEARCH_PATHS_SYSTEM
}
PATH_SUFFIXES lib
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
GEOGRAM DEFAULT_MSG GEOGRAM_LIBRARY GEOGRAM_INCLUDE_DIR
)
# Create an imported target for Geogram
If
(
GEOGRAM_FOUND
)
set
(
GEOGRAM_INSTALL_PREFIX
${
GEOGRAM_INCLUDE_DIR
}
/..
)
if
(
NOT TARGET Geogram::geogram
)
add_library
(
Geogram::geogram UNKNOWN IMPORTED
)
# Interface include directory
set_target_Properties
(
Geogram::geogram PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES
"
${
GEOGRAM_INCLUDE_DIR
}
"
)
# Link to library file
Set_Target_Properties
(
Geogram::geogram PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES
"CXX"
IMPORTED_LOCATION
"
${
GEOGRAM_LIBRARY
}
"
)
endif
()
if
(
NOT TARGET Geogram::geogram_gfx
)
add_library
(
Geogram::geogram_gfx UNKNOWN IMPORTED
)
set_target_properties
(
Geogram::geogram_gfx PROPERTIES
INTERFACE_LINK_LIBRARIES
${
GEOGRAM_GLFW3_LIBRARY
}
)
# Interface include directory
set_target_properties
(
Geogram::geogram_gfx PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES
"
${
GEOGRAM_INCLUDE_DIR
}
"
)
# Link to library file
set_target_properties
(
Geogram::geogram_gfx PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES
"CXX"
IMPORTED_LOCATION
"
${
GEOGRAM_GFX_LIBRARY
}
"
)
endif
()
endif
()
# Hide variables from the default CMake-Gui options
mark_as_advanced
(
GEOGRAM_LIBRARY GEOGRAM_GFX_LIBRARY GEOGRAM_INCLUDE_DIR
)
# Some specific settings for Windows
if
(
WIN32
)
# Default mode for Windows uses static libraries. Use this variable to
# link with geogram compiled as DLLs.
set
(
VORPALINE_BUILD_DYNAMIC FALSE CACHE BOOL
"Installed Geogram uses DLLs"
)
# remove warning for multiply defined symbols (caused by multiple
# instanciations of STL templates)
add_definitions
(
/wd4251
)
# remove all unused stuff from windows.h
add_definitions
(
-DWIN32_LEAN_AND_MEAN
)
add_definitions
(
-DVC_EXTRALEAN
)
# do not define a min() and a max() macro, breaks
# std::min() and std::max() !!
add_definitions
(
-DNOMINMAX
)
# we want M_PI etc...
add_definitions
(
-D_USE_MATH_DEFINES
)
if
(
NOT VORPALINE_BUILD_DYNAMIC
)
# If we use static library, we link with the static C++ runtime.
foreach
(
config
${
CMAKE_CONFIGURATION_TYPES
}
)
string
(
TOUPPER
${
config
}
config
)
string
(
REPLACE /MD /MT CMAKE_C_FLAGS_
${
config
}
"
${
CMAKE_C_FLAGS_
${
config
}}
"
)
string
(
REPLACE /MD /MT CMAKE_CXX_FLAGS_
${
config
}
"
${
CMAKE_CXX_FLAGS_
${
config
}}
"
)
endforeach
()
endif
()
endif
()
cmake/FindPhySim.cmake
View file @
5edb5a05
# - Try to find PHYSIM
# Once done this will define
#
#
# PHYSIM_FOUND - system has PHYSIM
# PHYSIM_INCLUDE_DIRS - the PHYSIM include directory
# PHYSIM_LIBRARY_DIR - where the libraries are
# PHYSIM_LIBRARY - Link these to use PHYSIM
#
#
IF
(
PHYSIM_INCLUDE_DIRS
)
# Already in cache, be silent
SET
(
PHYSIM_FIND_QUIETLY TRUE
)
...
...
@@ -20,17 +20,18 @@ file (
FIND_PATH
(
PHYSIM_INCLUDE_DIR PhySim/Config/PhySimDefines.hh
PATHS
${
_libdirs
}
PATHS
${
_libdirs
}
${
CMAKE_SOURCE_DIR
}
/libs
)
add_definitions
(
-DPHYSIMDLL -DUSEPHYSIM
)
if
(
PHYSIM_ENABLE_QWT
)
if
(
QT5_FOUND
)
SET
(
PHYSIM_DEPS
"Qwt6
;GMP
"
)
SET
(
PHYSIM_DEPS
"Qwt6"
)
else
()
SET
(
PHYSIM_DEPS
"Qwt5
;GMP
"
)
SET
(
PHYSIM_DEPS
"Qwt5"
)
endif
()
endif
(
PHYSIM_ENABLE_QWT
)
IF
(
PHYSIM_INCLUDE_DIR
)
SET
(
PHYSIM_FOUND TRUE
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment