mirror of https://github.com/CGAL/cgal
Add CMakeLists.txt
This commit is contained in:
parent
deacb30cfa
commit
f109042834
|
|
@ -0,0 +1,39 @@
|
|||
# This is the CMake script for compiling a CGAL application.
|
||||
|
||||
project( largest_empty_rect_2 )
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.5)
|
||||
|
||||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
|
||||
|
||||
find_package(CGAL REQUIRED Qt3 )
|
||||
include( ${CGAL_USE_FILE} )
|
||||
|
||||
find_package(Qt3-patched QUIET)
|
||||
# FindQt3-patched.cmake is FindQt3.cmake patched by CGAL developers, so
|
||||
# that it can be used together with FindQt4: all its variables are prefixed
|
||||
# by "QT3_" instead of "QT_".
|
||||
|
||||
if ( CGAL_FOUND AND QT3_FOUND )
|
||||
|
||||
# use the Qt MOC preprocessor on classes that derives from QObject
|
||||
include( Qt3Macros-patched )
|
||||
qt3_generate_moc( Qt_widget_toolbar.h Qt_widget_toolbar.moc )
|
||||
qt3_generate_moc( Qt_widget_move_list_point.h Qt_widget_move_list_point.moc )
|
||||
qt3_generate_moc( largest_empty_rect_2.cpp largest_empty_rect_2.moc )
|
||||
|
||||
|
||||
# The executable itself.
|
||||
add_executable ( largest_empty_rect_2
|
||||
largest_empty_rect_2.cpp largest_empty_rect_2.moc
|
||||
Qt_widget_toolbar.cpp Qt_widget_toolbar.moc
|
||||
Qt_widget_move_list_point.cpp Qt_widget_move_list_point.moc
|
||||
)
|
||||
|
||||
target_link_libraries( largest_empty_rect_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} )
|
||||
|
||||
else()
|
||||
|
||||
message(STATUS "NOTICE: This demo requires CGAL and Qt3, and will not be compiled.")
|
||||
|
||||
endif()
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
# Created by the script cgal_create_makefile
|
||||
# This is the makefile for compiling a CGAL application.
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# include platform specific settings
|
||||
#---------------------------------------------------------------------#
|
||||
# Choose the right include file from the <cgalroot>/make directory.
|
||||
|
||||
# CGAL_MAKEFILE = ENTER_YOUR_INCLUDE_MAKEFILE_HERE
|
||||
include $(CGAL_MAKEFILE)
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# compiler flags
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
CXXFLAGS = -I../../../include/ \
|
||||
$(CGAL_CXXFLAGS) \
|
||||
$(LONG_NAME_PROBLEM_CXXFLAGS) \
|
||||
$(DEBUG_OPT)
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# linker flags
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
LIBPATH = \
|
||||
$(CGAL_LIBPATH)
|
||||
|
||||
LDFLAGS = \
|
||||
$(LONG_NAME_PROBLEM_LDFLAGS) \
|
||||
$(CGAL_LDFLAGS) \
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# target entries
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
all: largest_empty_rect_2$(EXE_EXT)
|
||||
|
||||
Qt_widget_toolbar$(OBJ_EXT): Qt_widget_toolbar.cpp Qt_widget_toolbar.moc
|
||||
$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) Qt_widget_toolbar.cpp
|
||||
|
||||
Qt_widget_toolbar.moc: Qt_widget_toolbar.h
|
||||
$(QT_MOC) -o Qt_widget_toolbar.moc Qt_widget_toolbar.h
|
||||
|
||||
Qt_widget_move_list_point$(OBJ_EXT): Qt_widget_move_list_point.moc \
|
||||
Qt_widget_move_list_point.cpp
|
||||
$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) Qt_widget_move_list_point.cpp
|
||||
|
||||
Qt_widget_move_list_point.moc: Qt_widget_move_list_point.h
|
||||
$(QT_MOC) -o Qt_widget_move_list_point.moc Qt_widget_move_list_point.h
|
||||
|
||||
largest_empty_rect_2$(OBJ_EXT): largest_empty_rect_2.cpp largest_empty_rect_2.moc
|
||||
$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) largest_empty_rect_2.cpp
|
||||
|
||||
largest_empty_rect_2.moc: largest_empty_rect_2.cpp
|
||||
${QT_MOC} -o largest_empty_rect_2.moc largest_empty_rect_2.cpp
|
||||
|
||||
largest_empty_rect_2$(EXE_EXT): largest_empty_rect_2$(OBJ_EXT) \
|
||||
Qt_widget_move_list_point$(OBJ_EXT) \
|
||||
Qt_widget_toolbar$(OBJ_EXT)
|
||||
$(CGAL_CXX) $(EXE_OPT)largest_empty_rect_2 \
|
||||
largest_empty_rect_2$(OBJ_EXT) \
|
||||
Qt_widget_toolbar$(OBJ_EXT) Qt_widget_move_list_point$(OBJ_EXT) \
|
||||
$(LDFLAGS)
|
||||
|
||||
clean: largest_empty_rect_2.clean \
|
||||
Qt_widget_toolbar.clean \
|
||||
Qt_widget_move_list_point.clean
|
||||
#---------------------------------------------------------------------#
|
||||
# suffix rules
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
.cpp$(OBJ_EXT):
|
||||
$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $<
|
||||
Loading…
Reference in New Issue