Skip to content

Commit d1a7750

Browse files
committed
Add cgal version in the cmakelists.txt
1 parent 52a2c51 commit d1a7750

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

CMakeLists.txt

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,25 @@ set( CMAKE_BUILD_TYPE "Release")
1515
set( CMAKE_CXX_FLAGS "-O2" )
1616

1717
set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true )
18-
18+
1919
if ( COMMAND cmake_policy )
20-
cmake_policy( SET CMP0003 NEW )
20+
cmake_policy( SET CMP0003 NEW )
2121
endif()
2222

2323
if (MSVC)
24-
add_definitions("/EHsc")
24+
add_definitions("/EHsc")
2525
endif(MSVC)
2626

2727
# CGAL
2828
find_package( CGAL QUIET COMPONENTS )
2929
if ( CGAL_FOUND )
3030
message(STATUS "CGAL found")
31-
message(STATUS ${CGAL_LIBRARIES})
32-
message(STATUS ${CGAL_3RD_PARTY_LIBRARIES})
31+
message(STATUS "CGAL_VERSION: ${CGAL_VERSION}")
32+
message(STATUS "CGAL_DIR: ${CGAL_DIR}")
33+
message(STATUS "CGAL_INCLUDE_DIR: ${CGAL_INCLUDE_DIR}")
3334
else()
3435
message(SEND_ERROR "val3dity requires the CGAL library")
35-
return()
36+
return()
3637
endif()
3738

3839
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
@@ -47,14 +48,14 @@ find_package( Boost REQUIRED COMPONENTS filesystem)
4748

4849
if ( NOT Boost_FOUND )
4950
message( SEND_ERROR "val3dity requires the Boost library" )
50-
return()
51+
return()
5152
endif()
5253

5354
# GEOS
5455
find_package( GEOS CONFIG REQUIRED )
5556
if ( GEOS_FOUND )
56-
get_target_property(GEOS_LOCATION GEOS::geos_c LOCATION)
57-
message( STATUS "Found GEOS: ${GEOS_LOCATION}" )
57+
get_target_property(GEOS_LOCATION GEOS::geos_c LOCATION)
58+
message( STATUS "Found GEOS: ${GEOS_LOCATION}" )
5859
else()
5960
message( SEND_ERROR "val3dity requires the GEOS library" )
6061
endif()
@@ -74,14 +75,14 @@ else()
7475
find_package(spdlog CONFIG REQUIRED)
7576
# pugixml
7677
find_package(pugixml CONFIG REQUIRED)
77-
78+
7879
# Find TCLAP's include path using find_path (tclap provides no cmake target)
7980
find_path(TCLAP_INCLUDE_DIR "tclap/CmdLine.h")
8081

8182
if (TCLAP_INCLUDE_DIR)
82-
message(STATUS "Found TCLAP: ${TCLAP_INCLUDE_DIR}")
83+
message(STATUS "Found TCLAP: ${TCLAP_INCLUDE_DIR}")
8384
else()
84-
message(FATAL_ERROR "TCLAP not found. Make sure it is installed via eg. vcpkg.")
85+
message(FATAL_ERROR "TCLAP not found. Make sure it is installed via eg. vcpkg.")
8586
endif()
8687
endif()
8788

@@ -92,12 +93,12 @@ list(REMOVE_ITEM SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/val3dity.cpp)
9293

9394
add_library(val3dity_core OBJECT ${SRC_FILES})
9495

95-
target_link_libraries(val3dity_core
96+
target_link_libraries(val3dity_core
9697
PUBLIC
9798
CGAL::CGAL
9899
PRIVATE
99100
CGAL::Eigen3_support
100-
GEOS::geos_c
101+
GEOS::geos_c
101102
)
102103
if ( VAL3DITY_USE_INTERNAL_DEPS )
103104
target_link_libraries(val3dity_core PUBLIC val3dity_thirdparty)
@@ -107,7 +108,7 @@ endif()
107108

108109
if ( VAL3DITY_LIBRARY )
109110
message(STATUS "Building val3dity library")
110-
111+
111112
add_library(val3dity STATIC ${CMAKE_CURRENT_SOURCE_DIR}/src/val3dity.cpp)
112113
target_include_directories(val3dity PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)
113114
target_link_libraries(val3dity PUBLIC val3dity_core)

0 commit comments

Comments
 (0)