diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-11-05 15:06:10 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-05 15:06:10 -0800 |
commit | 06e65e4c02dc6e043944293be4c91f11e272d945 (patch) | |
tree | 3acecf86fa8d8e862a1be1b14a7d6e7e9bdc39f6 /CMakeLists.txt | |
parent | e7edaea4f85fc998ed56e098d306b957fd0a24bc (diff) | |
download | subsurface-06e65e4c02dc6e043944293be4c91f11e272d945.tar.gz |
Cmake: untangle subsurface and subsurface-mobile
In the cmake restructuring it seems that subsurface-mobile building got
completely messed up. With this subsurface-mobile still doesn't actually
build (still too many unfulfilled dependencies, but we're getting closer).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 35b0299ef..2840a2c33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -321,7 +321,10 @@ add_subdirectory(translations) add_subdirectory(subsurface-core) add_subdirectory(qt-models) add_subdirectory(profile-widget) -add_subdirectory(desktop-widgets) + +if (NOT SUBSURFACE_MOBILE) + add_subdirectory(desktop-widgets) +endif() if(FBSUPPORT) add_definitions(-DFBSUPPORT) @@ -331,13 +334,6 @@ if(BTSUPPORT) add_definitions(-DBT_SUPPORT) endif() -# the main app. -set(SUBSURFACE_APP - subsurface-desktop-main.cpp - subsurface-desktop-helper.cpp -) - -source_group("Subsurface App" FILES ${SUBSURFACE_APP}) # add pthread to the end of the library list on Linux # this is only needed on Ubuntu (why do these idiots break everything?) @@ -348,6 +344,7 @@ endif() # create the executables if(SUBSURFACE_MOBILE) + set(SUBSURFACE_TARGET subsurface-mobile) set(MOBILE_SRC qt-mobile/qmlmanager.cpp qt-mobile/qmlprofile.cpp @@ -363,39 +360,44 @@ if(SUBSURFACE_MOBILE) add_executable(subsurface-mobile ${MOBILE_SRC} ${SUBSURFACE_PKG} ${SUBSURFACE_RESOURCES} ${MOBILE_RESOURCES}) endif() target_link_libraries( - subsurface-mobile + ${SUBSURFACE_TARGET} + subsurface_profile + subsurface_models + subsurface_corelib + ${SUBSURFACE_LINK_LIBRARIES}) +else() +# the main app. + set(SUBSURFACE_APP + subsurface-desktop-main.cpp + subsurface-desktop-helper.cpp + ) + source_group("Subsurface App" FILES ${SUBSURFACE_APP}) + + if(ANDROID) + # Produce a shared-library instead of a program. + # Something that androiddeployqt can work with. + # this is the desktop version, running on android. + add_library(${SUBSURFACE_TARGET} SHARED ${SUBSURFACE_PKG} ${SUBSURFACE_APP} ${SUBSURFACE_RESOURCES}) + else() + add_executable(${SUBSURFACE_TARGET} MACOSX_BUNDLE WIN32 ${SUBSURFACE_PKG} ${SUBSURFACE_APP} ${SUBSURFACE_RESOURCES}) + endif() + + target_link_libraries( + ${SUBSURFACE_TARGET} subsurface_generated_ui subsurface_interface subsurface_profile subsurface_statistics subsurface_models subsurface_corelib - ${SUBSURFACE_LINK_LIBRARIES}) + ${SUBSURFACE_LINK_LIBRARIES} + ) + add_dependencies(subsurface_statistics subsurface_generated_ui) + add_dependencies(subsurface_interface subsurface_generated_ui) + add_dependencies(subsurface_profile subsurface_generated_ui) + add_dependencies(subsurface_generated_ui version) endif() -if(ANDROID) - # Produce a shared-library instead of a program. - # Something that androiddeployqt can work with. - # this is the desktop version, running on android. - add_library(${SUBSURFACE_TARGET} SHARED ${SUBSURFACE_PKG} ${SUBSURFACE_APP} ${SUBSURFACE_RESOURCES}) -else() - add_executable(${SUBSURFACE_TARGET} MACOSX_BUNDLE WIN32 ${SUBSURFACE_PKG} ${SUBSURFACE_APP} ${SUBSURFACE_RESOURCES}) -endif() -target_link_libraries( - ${SUBSURFACE_TARGET} - subsurface_generated_ui - subsurface_interface - subsurface_profile - subsurface_statistics - subsurface_models - subsurface_corelib - ${SUBSURFACE_LINK_LIBRARIES} -) - -add_dependencies(subsurface_statistics subsurface_generated_ui) -add_dependencies(subsurface_profile subsurface_generated_ui) -add_dependencies(subsurface_interface subsurface_generated_ui) -add_dependencies(subsurface_generated_ui version) add_dependencies(subsurface_corelib version) # add platform specific actions |