Skip to content

Commit

Permalink
Enables USE_FOLDERS in CMakeLists. (Stellarium#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
gongminmin authored and alex-w committed Jun 10, 2018
1 parent 3a93883 commit 6a1d60f
Show file tree
Hide file tree
Showing 38 changed files with 101 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ ENDIF()
# warn about deprecated stuff so that we may try fixing it
SET(CMAKE_WARN_DEPRECATED 1)

SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)

########### Project name ###########
PROJECT(Stellarium)
# Use integer versions instead of strings for easier handling if required
Expand Down Expand Up @@ -359,6 +361,7 @@ ADD_PLUGIN(TelescopeControl 1)
# Custom target used to manage dependencies of stellarium -> Static plugins
# It is important that static plugins are compiled before stellarium main executable is linked
ADD_CUSTOM_TARGET(AllStaticPlugins ALL)
SET_TARGET_PROPERTIES(AllStaticPlugins PROPERTIES FOLDER "plugins")

########### Find packages ###########
FIND_PACKAGE(Qt5Core REQUIRED)
Expand Down Expand Up @@ -646,6 +649,7 @@ CONFIGURE_FILE(

ADD_CUSTOM_TARGET(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
SET_TARGET_PROPERTIES(uninstall PROPERTIES FOLDER "src")

########### Packaging info for CPack ###########

Expand Down
2 changes: 2 additions & 0 deletions data/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ADD_CUSTOM_COMMAND(
TARGET splash
COMMAND ${CMAKE_COMMAND} -E copy ${_splashSrcFile} ${_splashDstFile}
)
SET_TARGET_PROPERTIES(splash PROPERTIES FOLDER "data")

########### icon target ###############
ADD_CUSTOM_TARGET(icon ALL)
Expand All @@ -44,6 +45,7 @@ ADD_CUSTOM_COMMAND(
TARGET icon
COMMAND ${CMAKE_COMMAND} -E copy ${_iconSrcFile} ${_iconDstFile}
)
SET_TARGET_PROPERTIES(icon PROPERTIES FOLDER "data")

# install splash and icon
IF(MACOSX)
Expand Down
2 changes: 2 additions & 0 deletions plugins/AngleMeasure/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ TARGET_LINK_LIBRARIES(AngleMeasure-static Qt5::Core Qt5::Widgets)
SET_TARGET_PROPERTIES(AngleMeasure-static PROPERTIES OUTPUT_NAME "AngleMeasure")
SET_TARGET_PROPERTIES(AngleMeasure-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins AngleMeasure-static)

SET_TARGET_PROPERTIES(AngleMeasure-static PROPERTIES FOLDER "plugins/AngleMeasure")
2 changes: 2 additions & 0 deletions plugins/ArchaeoLines/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ TARGET_LINK_LIBRARIES(ArchaeoLines-static Qt5::Core Qt5::Widgets)
SET_TARGET_PROPERTIES(ArchaeoLines-static PROPERTIES OUTPUT_NAME "ArchaeoLines")
SET_TARGET_PROPERTIES(ArchaeoLines-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins ArchaeoLines-static)

SET_TARGET_PROPERTIES(ArchaeoLines-static PROPERTIES FOLDER "plugins/ArchaeoLines")
2 changes: 2 additions & 0 deletions plugins/CompassMarks/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ TARGET_LINK_LIBRARIES(CompassMarks-static Qt5::Core Qt5::Widgets)
SET_TARGET_PROPERTIES(CompassMarks-static PROPERTIES OUTPUT_NAME "CompassMarks")
SET_TARGET_PROPERTIES(CompassMarks-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins CompassMarks-static)

SET_TARGET_PROPERTIES(CompassMarks-static PROPERTIES FOLDER "plugins/CompassMarks")
2 changes: 2 additions & 0 deletions plugins/EquationOfTime/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ TARGET_LINK_LIBRARIES(EquationOfTime-static Qt5::Core Qt5::Widgets)
SET_TARGET_PROPERTIES(EquationOfTime-static PROPERTIES OUTPUT_NAME "EquationOfTime")
SET_TARGET_PROPERTIES(EquationOfTime-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins EquationOfTime-static)

SET_TARGET_PROPERTIES(EquationOfTime-static PROPERTIES FOLDER "plugins/EquationOfTime")
3 changes: 3 additions & 0 deletions plugins/Exoplanets/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ TARGET_LINK_LIBRARIES(Exoplanets-static Qt5::Core Qt5::Network Qt5::Widgets qcus
SET_TARGET_PROPERTIES(Exoplanets-static PROPERTIES OUTPUT_NAME "Exoplanets")
SET_TARGET_PROPERTIES(Exoplanets-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins Exoplanets-static)

SET_TARGET_PROPERTIES(Exoplanets-static PROPERTIES FOLDER "plugins/Exoplanets")

2 changes: 2 additions & 0 deletions plugins/FOV/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ TARGET_LINK_LIBRARIES(FOV-static Qt5::Core Qt5::Widgets)
SET_TARGET_PROPERTIES(FOV-static PROPERTIES OUTPUT_NAME "FOV")
SET_TARGET_PROPERTIES(FOV-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins FOV-static)

SET_TARGET_PROPERTIES(FOV-static PROPERTIES FOLDER "plugins/FOV")
1 change: 1 addition & 0 deletions plugins/HelloStelModule/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ TARGET_LINK_LIBRARIES(HelloStelModule-static Qt5::Core Qt5::Gui)
SET_TARGET_PROPERTIES(HelloStelModule-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins HelloStelModule-static)

SET_TARGET_PROPERTIES(HelloStelModule-static PROPERTIES FOLDER "plugins/HelloStelModule")
1 change: 1 addition & 0 deletions plugins/LogBook/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,4 @@ IF(BUILD_STATIC_PLUGINS)
ADD_DEPENDENCIES(AllStaticPlugins LogBook-static)
ENDIF()

SET_TARGET_PROPERTIES(LogBook-static PROPERTIES FOLDER "plugins/LogBook")
2 changes: 2 additions & 0 deletions plugins/MeteorShowers/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ TARGET_LINK_LIBRARIES(MeteorShowers-static Qt5::Core Qt5::Network Qt5::Widgets)
SET_TARGET_PROPERTIES(MeteorShowers-static PROPERTIES OUTPUT_NAME "MeteorShowers")
SET_TARGET_PROPERTIES(MeteorShowers-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins MeteorShowers-static)

SET_TARGET_PROPERTIES(MeteorShowers-static PROPERTIES FOLDER "plugins/MeteorShowers")
2 changes: 2 additions & 0 deletions plugins/NavStars/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ TARGET_LINK_LIBRARIES(NavStars-static Qt5::Core Qt5::Widgets)
SET_TARGET_PROPERTIES(NavStars-static PROPERTIES OUTPUT_NAME "NavStars")
SET_TARGET_PROPERTIES(NavStars-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins NavStars-static)

SET_TARGET_PROPERTIES(NavStars-static PROPERTIES FOLDER "plugins/NavStars")
2 changes: 2 additions & 0 deletions plugins/Novae/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ TARGET_LINK_LIBRARIES(Novae-static Qt5::Core Qt5::Network Qt5::Widgets)
SET_TARGET_PROPERTIES(Novae-static PROPERTIES OUTPUT_NAME "Novae")
SET_TARGET_PROPERTIES(Novae-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins Novae-static)

SET_TARGET_PROPERTIES(Novae-static PROPERTIES FOLDER "plugins/Novae")
2 changes: 2 additions & 0 deletions plugins/Observability/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ TARGET_LINK_LIBRARIES(Observability-static Qt5::Core Qt5::Widgets)
SET_TARGET_PROPERTIES(Observability-static PROPERTIES OUTPUT_NAME "Observability")
SET_TARGET_PROPERTIES(Observability-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins Observability-static)

SET_TARGET_PROPERTIES(Observability-static PROPERTIES FOLDER "plugins/Observability")
2 changes: 2 additions & 0 deletions plugins/Oculars/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ SET_TARGET_PROPERTIES(Oculars-static PROPERTIES OUTPUT_NAME "Oculars")
TARGET_LINK_LIBRARIES(Oculars-static Qt5::Core Qt5::Widgets)
SET_TARGET_PROPERTIES(Oculars-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins Oculars-static)

SET_TARGET_PROPERTIES(Oculars-static PROPERTIES FOLDER "plugins/Oculars")
3 changes: 3 additions & 0 deletions plugins/PointerCoordinates/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ TARGET_LINK_LIBRARIES(PointerCoordinates-static Qt5::Core Qt5::Widgets)
SET_TARGET_PROPERTIES(PointerCoordinates-static PROPERTIES OUTPUT_NAME "PointerCoordinates")
SET_TARGET_PROPERTIES(PointerCoordinates-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins PointerCoordinates-static)

SET_TARGET_PROPERTIES(PointerCoordinates-static PROPERTIES FOLDER "plugins/PointerCoordinates")

2 changes: 2 additions & 0 deletions plugins/Pulsars/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ TARGET_LINK_LIBRARIES(Pulsars-static Qt5::Core Qt5::Network Qt5::Widgets)
SET_TARGET_PROPERTIES(Pulsars-static PROPERTIES OUTPUT_NAME "Pulsars")
SET_TARGET_PROPERTIES(Pulsars-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins Pulsars-static)

SET_TARGET_PROPERTIES(Pulsars-static PROPERTIES FOLDER "plugins/Pulsars")
2 changes: 2 additions & 0 deletions plugins/Quasars/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ TARGET_LINK_LIBRARIES(Quasars-static Qt5::Core Qt5::Network Qt5::Widgets)
SET_TARGET_PROPERTIES(Quasars-static PROPERTIES OUTPUT_NAME "Quasars")
SET_TARGET_PROPERTIES(Quasars-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins Quasars-static)

SET_TARGET_PROPERTIES(Quasars-static PROPERTIES FOLDER "plugins/Quasars")
2 changes: 2 additions & 0 deletions plugins/RemoteControl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ if(PYTHON_EXECUTABLE)
)

add_dependencies(RemoteControl-update-translationdata generate-pot-stellarium-remotecontrol-js)

SET_TARGET_PROPERTIES(RemoteControl-update-translationdata PROPERTIES FOLDER "plugins/RemoteControl/util")
endif()

IF(APPLE)
Expand Down
2 changes: 2 additions & 0 deletions plugins/RemoteControl/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ TARGET_LINK_LIBRARIES(RemoteControl-static Qt5::Core Qt5::Network Qt5::Widgets)
SET_TARGET_PROPERTIES(RemoteControl-static PROPERTIES OUTPUT_NAME "RemoteControl")
SET_TARGET_PROPERTIES(RemoteControl-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins RemoteControl-static)

SET_TARGET_PROPERTIES(RemoteControl-static PROPERTIES FOLDER "plugins/RemoteControl")
2 changes: 2 additions & 0 deletions plugins/RemoteSync/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ TARGET_LINK_LIBRARIES(RemoteSync-static Qt5::Core Qt5::Network Qt5::Widgets)
SET_TARGET_PROPERTIES(RemoteSync-static PROPERTIES OUTPUT_NAME "RemoteSync")
SET_TARGET_PROPERTIES(RemoteSync-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins RemoteSync-static)

SET_TARGET_PROPERTIES(RemoteSync-static PROPERTIES FOLDER "plugins/RemoteSync")
2 changes: 2 additions & 0 deletions plugins/Satellites/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,5 @@ ELSE()
SET_TARGET_PROPERTIES(Satellites-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN -Wno-unused-parameter")
ENDIF()
ADD_DEPENDENCIES(AllStaticPlugins Satellites-static)

SET_TARGET_PROPERTIES(Satellites-static PROPERTIES FOLDER "plugins/Satellites")
2 changes: 2 additions & 0 deletions plugins/Scenery3d/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,5 @@ TARGET_LINK_LIBRARIES(Scenery3d-static Qt5::Core Qt5::Concurrent Qt5::Gui ${STEL
SET_TARGET_PROPERTIES(Scenery3d-static PROPERTIES OUTPUT_NAME "Scenery3d")
SET_TARGET_PROPERTIES(Scenery3d-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins Scenery3d-static)

SET_TARGET_PROPERTIES(Scenery3d-static PROPERTIES FOLDER "plugins/Scenery3d")
2 changes: 2 additions & 0 deletions plugins/SimpleDrawLine/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ ELSE()
SET_TARGET_PROPERTIES(SimpleDrawLine-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins SimpleDrawLine-static)
ENDIF()

SET_TARGET_PROPERTIES(SimpleDrawLine-static PROPERTIES FOLDER "plugins/SimpleDrawLine")
2 changes: 2 additions & 0 deletions plugins/SolarSystemEditor/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ TARGET_LINK_LIBRARIES(SolarSystemEditor-static Qt5::Core Qt5::Network Qt5::Widge
SET_TARGET_PROPERTIES(SolarSystemEditor-static PROPERTIES OUTPUT_NAME "SolarSystemEditor")
SET_TARGET_PROPERTIES(SolarSystemEditor-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins SolarSystemEditor-static)

SET_TARGET_PROPERTIES(SolarSystemEditor-static PROPERTIES FOLDER "plugins/SolarSystemEditor")
3 changes: 3 additions & 0 deletions plugins/Supernovae/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ TARGET_LINK_LIBRARIES(Supernovae-static Qt5::Core Qt5::Network Qt5::Widgets)
SET_TARGET_PROPERTIES(Supernovae-static PROPERTIES OUTPUT_NAME "Supernovae")
SET_TARGET_PROPERTIES(Supernovae-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins Supernovae-static)

SET_TARGET_PROPERTIES(Supernovae-static PROPERTIES FOLDER "plugins/Supernovae")

1 change: 1 addition & 0 deletions plugins/TelescopeControl/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ TARGET_LINK_LIBRARIES(TelescopeControl-static
SET_TARGET_PROPERTIES(TelescopeControl-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins TelescopeControl-static)

SET_TARGET_PROPERTIES(TelescopeControl-static PROPERTIES FOLDER "plugins/TelescopeControl")
2 changes: 2 additions & 0 deletions plugins/TelescopeControl/src/INDI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ target_include_directories(TelescopeControl_INDI INTERFACE ${CMAKE_CURRENT_SOURC
IF(ENABLE_TESTING)
add_subdirectory(test)
ENDIF(ENABLE_TESTING)

SET_TARGET_PROPERTIES(TelescopeControl_INDI PROPERTIES FOLDER "plugins/TelescopeControl")
3 changes: 3 additions & 0 deletions plugins/TelescopeControl/src/INDI/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ find_package(Qt5Test)
add_executable(testTelescopeControl_INDI testTelescopeControl_INDI.cpp testTelescopeControl_INDI.hpp)
target_link_libraries(testTelescopeControl_INDI Qt5::Test TelescopeControl_INDI stelMain)
add_test(testTelescopeControl_INDI testTelescopeControl_INDI)
SET_TARGET_PROPERTIES(testTelescopeControl_INDI PROPERTIES FOLDER "plugins/TelescopeControl/test")

add_executable(testINDIConnection testINDIConnection.cpp testINDIConnection.hpp)
target_link_libraries(testINDIConnection Qt5::Test TelescopeControl_INDI stelMain)
add_test(testINDIConnection testINDIConnection)
SET_TARGET_PROPERTIES(testINDIConnection PROPERTIES FOLDER "plugins/TelescopeControl/test")

add_executable(testTelescopeClientINDI testTelescopeClientINDI.cpp testTelescopeClientINDI.hpp)
target_link_libraries(testTelescopeClientINDI Qt5::Test TelescopeControl_INDI stelMain)
add_test(testTelescopeClientINDI testTelescopeClientINDI)
SET_TARGET_PROPERTIES(testTelescopeClientINDI PROPERTIES FOLDER "plugins/TelescopeControl/test")
2 changes: 2 additions & 0 deletions plugins/TelescopeControl/src/Lx200/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ target_link_libraries(TelescopeControl_Lx200
Qt5::Gui
TelescopeControl_common
)

SET_TARGET_PROPERTIES(TelescopeControl_Lx200 PROPERTIES FOLDER "plugins/TelescopeControl")
2 changes: 2 additions & 0 deletions plugins/TelescopeControl/src/NexStar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ target_link_libraries(TelescopeControl_NexStar
Qt5::Gui
TelescopeControl_common
)

SET_TARGET_PROPERTIES(TelescopeControl_NexStar PROPERTIES FOLDER "plugins/TelescopeControl")
2 changes: 2 additions & 0 deletions plugins/TelescopeControl/src/Rts2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ target_link_libraries(TelescopeControl_Rts2
Qt5::Gui
TelescopeControl_common
)

SET_TARGET_PROPERTIES(TelescopeControl_Rts2 PROPERTIES FOLDER "plugins/TelescopeControl")
2 changes: 2 additions & 0 deletions plugins/TelescopeControl/src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ target_link_libraries(TelescopeControl_common
Qt5::Gui
Qt5::Widgets
)

SET_TARGET_PROPERTIES(TelescopeControl_common PROPERTIES FOLDER "plugins/TelescopeControl")
2 changes: 2 additions & 0 deletions plugins/TelescopeControl/src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ target_link_libraries(TelescopeControl_gui
TelescopeControl_common
TelescopeControl_INDI
)

SET_TARGET_PROPERTIES(TelescopeControl_gui PROPERTIES FOLDER "plugins/TelescopeControl")
2 changes: 2 additions & 0 deletions plugins/TextUserInterface/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ TARGET_LINK_LIBRARIES(TextUserInterface-static Qt5::Core Qt5::Widgets)
SET_TARGET_PROPERTIES(TextUserInterface-static PROPERTIES OUTPUT_NAME "TextUserInterface")
SET_TARGET_PROPERTIES(TextUserInterface-static PROPERTIES COMPILE_FLAGS "-DQT_STATICPLUGIN")
ADD_DEPENDENCIES(AllStaticPlugins TextUserInterface-static)

SET_TARGET_PROPERTIES(TextUserInterface-static PROPERTIES FOLDER "plugins/TextUserInterface")
2 changes: 2 additions & 0 deletions po/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# anyway.)

ADD_CUSTOM_TARGET(translations)
SET_TARGET_PROPERTIES(translations PROPERTIES FOLDER "po")

IF(NOT MSVC)
# These packages are now used only to generate .pot and .po files
Expand Down Expand Up @@ -117,6 +118,7 @@ MACRO(GETTEXT_CREATE_TRANSLATIONS _domain _firstLang)
# "translations" targets.
ADD_CUSTOM_TARGET(translations-${_domain} ${_addToAll} DEPENDS ${_gmoFiles})
ADD_DEPENDENCIES(translations translations-${_domain})
SET_TARGET_PROPERTIES(translations-${_domain} PROPERTIES FOLDER "po")

ENDMACRO(GETTEXT_CREATE_TRANSLATIONS )

Expand Down
18 changes: 17 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,10 @@ IF(WIN32)
"
)
ENDIF()


SET_TARGET_PROPERTIES(stelMain PROPERTIES FOLDER "src/core")
SET_TARGET_PROPERTIES(stellarium PROPERTIES FOLDER "src")

#############################################################################################
################################## Build unit tests #########################################
#############################################################################################
Expand All @@ -519,6 +522,7 @@ IF(ENABLE_TESTING)

# Custom target used to build all tests at once
ADD_CUSTOM_TARGET(buildTests)
SET_TARGET_PROPERTIES(buildTests PROPERTIES FOLDER "src/tests")

SET(tests_testDates_SRCS
tests/testDates.hpp
Expand All @@ -530,6 +534,7 @@ IF(ENABLE_TESTING)
TARGET_LINK_LIBRARIES(testDates ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testDates)
ADD_TEST(testDates testDates)
SET_TARGET_PROPERTIES(testDates PROPERTIES FOLDER "src/tests")

SET(tests_testStelFileMgr_SRCS
tests/testStelFileMgr.hpp
Expand All @@ -539,6 +544,7 @@ IF(ENABLE_TESTING)
TARGET_LINK_LIBRARIES(testStelFileMgr ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testStelFileMgr)
ADD_TEST(testStelFileMgr testStelFileMgr)
SET_TARGET_PROPERTIES(testStelFileMgr PROPERTIES FOLDER "src/tests")

SET(tests_testStelSphereGeometry_SRCS
tests/testStelSphereGeometry.hpp
Expand All @@ -548,6 +554,7 @@ IF(ENABLE_TESTING)
TARGET_LINK_LIBRARIES(testStelSphereGeometry ${TESTS_LIBRARIES} glues_stel)
ADD_DEPENDENCIES(buildTests testStelSphereGeometry)
ADD_TEST(testStelSphereGeometry testStelSphereGeometry)
SET_TARGET_PROPERTIES(testStelSphereGeometry PROPERTIES FOLDER "src/tests")

SET(tests_testStelSphericalIndex_SRCS
tests/testStelSphericalIndex.hpp
Expand All @@ -557,6 +564,7 @@ IF(ENABLE_TESTING)
TARGET_LINK_LIBRARIES(testStelSphericalIndex ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testStelSphericalIndex)
ADD_TEST(testStelSphericalIndex testStelSphericalIndex)
SET_TARGET_PROPERTIES(testStelSphericalIndex PROPERTIES FOLDER "src/tests")

SET(tests_testStelJsonParser_SRCS
tests/testStelJsonParser.hpp
Expand All @@ -566,6 +574,7 @@ IF(ENABLE_TESTING)
TARGET_LINK_LIBRARIES(testStelJsonParser ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testStelJsonParser)
ADD_TEST(testStelJsonParser testStelJsonParser)
SET_TARGET_PROPERTIES(testStelJsonParser PROPERTIES FOLDER "src/tests")

SET(tests_testStelVertexArray_SRCS
tests/testStelVertexArray.hpp
Expand All @@ -575,6 +584,7 @@ IF(ENABLE_TESTING)
TARGET_LINK_LIBRARIES(testStelVertexArray ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testStelVertexArray)
ADD_TEST(testStelVertexArray testStelVertexArray)
SET_TARGET_PROPERTIES(testStelVertexArray PROPERTIES FOLDER "src/tests")

SET(tests_testDeltaT_SRCS
tests/testDeltaT.hpp
Expand All @@ -584,6 +594,7 @@ IF(ENABLE_TESTING)
TARGET_LINK_LIBRARIES(testDeltaT ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testDeltaT)
ADD_TEST(testDeltaT testDeltaT)
SET_TARGET_PROPERTIES(testDeltaT PROPERTIES FOLDER "src/tests")

SET(tests_testConversions_SRCS
tests/testConversions.hpp
Expand All @@ -593,6 +604,7 @@ IF(ENABLE_TESTING)
TARGET_LINK_LIBRARIES(testConversions ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testConversions)
ADD_TEST(testConversions testConversions)
SET_TARGET_PROPERTIES(testConversions PROPERTIES FOLDER "src/tests")

SET(tests_testExtinction_SRCS
tests/testExtinction.hpp
Expand All @@ -602,6 +614,7 @@ IF(ENABLE_TESTING)
TARGET_LINK_LIBRARIES(testExtinction ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testExtinction)
ADD_TEST(testExtinction testExtinction)
SET_TARGET_PROPERTIES(testExtinction PROPERTIES FOLDER "src/tests")

SET(tests_testRefraction_SRCS
tests/testRefraction.hpp
Expand All @@ -611,6 +624,7 @@ IF(ENABLE_TESTING)
TARGET_LINK_LIBRARIES(testRefraction ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testRefraction)
ADD_TEST(testRefraction testRefraction)
SET_TARGET_PROPERTIES(testRefraction PROPERTIES FOLDER "src/tests")

SET(tests_testPrecession_SRCS
tests/testPrecession.hpp
Expand All @@ -620,6 +634,7 @@ IF(ENABLE_TESTING)
TARGET_LINK_LIBRARIES(testPrecession ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testPrecession)
ADD_TEST(testPrecession testPrecession)
SET_TARGET_PROPERTIES(testPrecession PROPERTIES FOLDER "src/tests")

SET(tests_testEphemeris_SRCS
tests/testEphemeris.hpp
Expand All @@ -629,5 +644,6 @@ IF(ENABLE_TESTING)
TARGET_LINK_LIBRARIES(testEphemeris ${TESTS_LIBRARIES})
ADD_DEPENDENCIES(buildTests testEphemeris)
ADD_TEST(testEphemeris testEphemeris)
SET_TARGET_PROPERTIES(testEphemeris PROPERTIES FOLDER "src/tests")

ENDIF (ENABLE_TESTING)
Loading

0 comments on commit 6a1d60f

Please sign in to comment.