mirror of https://github.com/CGAL/cgal
fix link issues
This commit is contained in:
parent
fc26c74e97
commit
0795c5f9fc
|
|
@ -35,8 +35,6 @@ This options should suffice to create `CMakeLists.txt` script
|
||||||
for most directories containing programs. However, in some special
|
for most directories containing programs. However, in some special
|
||||||
cases, it might still be required to create the script manually, for
|
cases, it might still be required to create the script manually, for
|
||||||
instance, if some source files/executables need a different linking than
|
instance, if some source files/executables need a different linking than
|
||||||
other source files.
|
other source files. The Section \subpage devman_create_and_use_a_cmakelist provides more details.
|
||||||
|
|
||||||
The section \subpage devman_create_and_use_a_cmakelist explains further how to do so.
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
/*!
|
/*!
|
||||||
\page devman_create_and_use_a_cmakelist How to use \cgal with CMake
|
\page devman_create_and_use_a_cmakelist How to use CGAL with CMake
|
||||||
|
|
||||||
This page will explain how to manually create a CMakeLists.txt file to link a custom program with \cgal.
|
This page will explain how to manually create a `CMakeLists.txt` file to link a custom program with \cgal.
|
||||||
A base can be created using the script `cgal_create_CMakeLists`. Its usage is detailed in Section \ref devman_create_cgal_CMakeLists.
|
A base can be created using the script `cgal_create_CMakeLists`. Its usage is detailed in Section \ref devman_create_cgal_CMakeLists.
|
||||||
\section seclink Linking with \cgal
|
\section seclink Linking with CGAL
|
||||||
To link with the \cgal library, use the following :
|
To link with the \cgal library, use the following:
|
||||||
\code
|
\code
|
||||||
find_package(CGAL)
|
find_package(CGAL)
|
||||||
add_executable(my_executable my_source_file.cpp)
|
add_executable(my_executable my_source_file.cpp)
|
||||||
target_link_libraries(my_executable CGAL::CGAL)
|
target_link_libraries(my_executable CGAL::CGAL)
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
Other CGAL libraries are linked similarly. For example, with CGAL_Core:
|
Other \cgal libraries are linked similarly. For example, with `CGAL_Core`:
|
||||||
|
|
||||||
\code
|
\code
|
||||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||||
|
|
@ -21,7 +21,7 @@ target_link_libraries(my_executable CGAL::CGAL CGAL::CGAL_Core)
|
||||||
There are also some cmake macros to link with \cgal dependencies that can be found in
|
There are also some cmake macros to link with \cgal dependencies that can be found in
|
||||||
the section \subpage thirdparty.
|
the section \subpage thirdparty.
|
||||||
|
|
||||||
\note The CGAL targets define the following compiler flags :
|
\note The \cgal targets define the following compiler flags:
|
||||||
- `-frounding-math` with gcc
|
- `-frounding-math` with gcc
|
||||||
- `/fp:strict /fp:except-` with MSVC
|
- `/fp:strict /fp:except-` with MSVC
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue