Use a list of files instead of filtering for *.c

While filtering for *.c / *.cpp is much smaller, it has the
disvantage of getting garbage on some computers as the devs
tends to create test files around.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-04-14 16:47:12 -03:00 committed by Dirk Hohndel
parent bce0b43449
commit 7b60f96734

View file

@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 2.8)
#options #options
SET(SUBSURFACE_QT_VERSION "4") SET(SUBSURFACE_QT_VERSION "4")
SET(CMAKE_AUTOMOC ON) SET(CMAKE_AUTOMOC ON)
SET(CMAKE_AUTOUIC ON) SET(CMAKE_AUTOUIC ON)
SET(CMAKE_MODULE_PATH ${${PROJECT_NAME}_SOURCE_DIR}/marbledata) SET(CMAKE_MODULE_PATH ${${PROJECT_NAME}_SOURCE_DIR}/marbledata)
@ -68,21 +69,88 @@ ADD_CUSTOM_TARGET(version ALL COMMAND
) )
# compile the core library, in C. # compile the core library, in C.
FILE(GLOB SUBSURFACE_CORE_LIB_SRCS *.c) SET(SUBSURFACE_CORE_LIB_SRCS
LIST(REMOVE_ITEM SUBSURFACE_CORE_LIB_SRCS deco.c
${CMAKE_CURRENT_SOURCE_DIR}/windows.c device.c
${CMAKE_CURRENT_SOURCE_DIR}/macos.c dive.c
${CMAKE_CURRENT_SOURCE_DIR}/cochran.c divelist.c
equipment.c
file.c
libdivecomputer.c
load-git.c
membuffer.c
parse-xml.c
planner.c
profile.c
worldmap-save.c
save-git.c
save-xml.c
sha1.c
statistics.c
strtod.c
subsurfacestartup.c
time.c
uemis.c
uemis-downloader.c
linux.c
) )
FILE(GLOB SUBSURFACE_PROFILE_LIB_SRCS qt-ui/profile/*.cpp) #the interface, in C++
FILE(GLOB SUBSURFACE_UI qt-ui/*.ui) SET(SUBSURFACE_INTERFACE
FILE(GLOB SUBSURFACE_INTERFACE qt-ui/*.cpp) qt-ui/updatemanager.cpp
FILE(GLOB SUBSURFACE_APP *.cpp ) qt-ui/about.cpp
IF(NOT (CMAKE_SYSTEM_NAME MATCHES Android)) qt-ui/completionmodels.cpp
LIST(REMOVE_ITEM SUBSURFACE_APP ${CMAKE_CURRENT_SOURCE_DIR}/android.cpp) qt-ui/divecomputermanagementdialog.cpp
ENDIF() qt-ui/divelistview.cpp
qt-ui/diveplanner.cpp
qt-ui/downloadfromdivecomputer.cpp
qt-ui/globe.cpp
qt-ui/graphicsview-common.cpp
qt-ui/kmessagewidget.cpp
qt-ui/maintab.cpp
qt-ui/mainwindow.cpp
qt-ui/modeldelegates.cpp
qt-ui/models.cpp
qt-ui/preferences.cpp
qt-ui/printdialog.cpp
qt-ui/printlayout.cpp
qt-ui/printoptions.cpp
qt-ui/simplewidgets.cpp
qt-ui/starwidget.cpp
qt-ui/subsurfacewebservices.cpp
qt-ui/tableview.cpp
qt-ui/exif.cpp
qt-ui/divelogimportdialog.cpp
qt-ui/tagwidget.cpp
qt-ui/groupedlineedit.cpp
qt-ui/usermanual.cpp
)
#the profile widget
SET(SUBSURFACE_PROFILE_LIB_SRCS
qt-ui/profile/profilewidget2.cpp
qt-ui/profile/diverectitem.cpp
qt-ui/profile/divepixmapitem.cpp
qt-ui/profile/divelineitem.cpp
qt-ui/profile/divetextitem.cpp
qt-ui/profile/animationfunctions.cpp
qt-ui/profile/divecartesianaxis.cpp
qt-ui/profile/diveplotdatamodel.cpp
qt-ui/profile/diveprofileitem.cpp
qt-ui/profile/diveeventitem.cpp
qt-ui/profile/divetooltipitem.cpp
qt-ui/profile/ruleritem.cpp
)
#the main app.
SET(SUBSURFACE_APP
main.cpp
gettextfromc.cpp
qt-gui.cpp
qthelper.cpp
)
FILE(GLOB SUBSURFACE_UI qt-ui/*.ui)
# to be replaced by QT_WRAP_UI on CMake 3. # to be replaced by QT_WRAP_UI on CMake 3.
IF(${SUBSURFACE_QT_VERSION} MATCHES "4") IF(${SUBSURFACE_QT_VERSION} MATCHES "4")
QT4_WRAP_UI( SUBSURFACE_UI_HDRS ${SUBSURFACE_UI} ) QT4_WRAP_UI( SUBSURFACE_UI_HDRS ${SUBSURFACE_UI} )
@ -112,6 +180,7 @@ target_link_libraries( subsurface
ADD_DEPENDENCIES(subsurface_profile subsurface_generated_ui) ADD_DEPENDENCIES(subsurface_profile subsurface_generated_ui)
ADD_DEPENDENCIES(subsurface_interface subsurface_generated_ui) ADD_DEPENDENCIES(subsurface_interface subsurface_generated_ui)
ADD_DEPENDENCIES(subsurface_generated_ui version) ADD_DEPENDENCIES(subsurface_generated_ui version)
ADD_DEPENDENCIES(subsurface_corelib version)
ENABLE_TESTING() ENABLE_TESTING()
ADD_EXECUTABLE( TestUnitConversion tests/testunitconversion.cpp ) ADD_EXECUTABLE( TestUnitConversion tests/testunitconversion.cpp )