subsurface/profile-widget/CMakeLists.txt
Berthold Stoeger d28f4d5347 profile: don't compile ProfileWidget2 on mobile
Since there (currently) is no interactive widget on mobile, there
is no point in compiling it. This was a bit more complicated than
expected, since there were other source files (divehandler.cpp
and ruleritem.cpp) which reference ProfileWidget2 and therefore
need to be removed. Otherwise, the dreadful MOC produces unresolved
references.

We could now remove all the conditional compiles in
profilewidget2.cpp, but let's keep them for now. We might have
to readd a number of them later, when making the mobile-profile
interactive.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-12-17 11:54:23 -08:00

46 lines
1,000 B
CMake

# the profile widget
set(SUBSURFACE_PROFILE_LIB_SRCS
animationfunctions.cpp
animationfunctions.h
divecartesianaxis.cpp
divecartesianaxis.h
diveeventitem.cpp
diveeventitem.h
divelineitem.cpp
divelineitem.h
divepixmapitem.cpp
divepixmapitem.h
diveprofileitem.cpp
diveprofileitem.h
diverectitem.cpp
diverectitem.h
divetextitem.cpp
divetextitem.h
divetooltipitem.cpp
divetooltipitem.h
profilescene.cpp
profilescene.h
tankitem.cpp
tankitem.h
)
if (SUBSURFACE_TARGET_EXECUTABLE MATCHES "MobileExecutable")
set(SUBSURFACE_PROFILE_LIB_SRCS
${SUBSURFACE_PROFILE_LIB_SRCS}
qmlprofile.cpp
qmlprofile.h
)
else ()
set(SUBSURFACE_PROFILE_LIB_SRCS
${SUBSURFACE_PROFILE_LIB_SRCS}
divehandler.cpp
divehandler.h
profilewidget2.cpp
profilewidget2.h
ruleritem.cpp
ruleritem.h
)
endif ()
source_group("Subsurface Profile" FILES ${SUBSURFACE_PROFILE_LIB_SRCS})
add_library(subsurface_profile STATIC ${SUBSURFACE_PROFILE_LIB_SRCS})
target_link_libraries(subsurface_profile ${QT_LIBRARIES})