diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-05-28 00:48:49 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-12 23:00:07 +0200 |
commit | 2c0fc395ba95bcaa3b877b88ebd2d1ee0affff9a (patch) | |
tree | 8e3922013a79e1bb83797a55ec83eac19bf0d2ce /CMake/GroupSources.cmake | |
parent | More CMake cleanup (diff) | |
download | cuberite-2c0fc395ba95bcaa3b877b88ebd2d1ee0affff9a.tar cuberite-2c0fc395ba95bcaa3b877b88ebd2d1ee0affff9a.tar.gz cuberite-2c0fc395ba95bcaa3b877b88ebd2d1ee0affff9a.tar.bz2 cuberite-2c0fc395ba95bcaa3b877b88ebd2d1ee0affff9a.tar.lz cuberite-2c0fc395ba95bcaa3b877b88ebd2d1ee0affff9a.tar.xz cuberite-2c0fc395ba95bcaa3b877b88ebd2d1ee0affff9a.tar.zst cuberite-2c0fc395ba95bcaa3b877b88ebd2d1ee0affff9a.zip |
Diffstat (limited to 'CMake/GroupSources.cmake')
-rw-r--r-- | CMake/GroupSources.cmake | 76 |
1 files changed, 39 insertions, 37 deletions
diff --git a/CMake/GroupSources.cmake b/CMake/GroupSources.cmake index 0f1762110..a8706794d 100644 --- a/CMake/GroupSources.cmake +++ b/CMake/GroupSources.cmake @@ -1,42 +1,44 @@ -# Enable the support for solution folders in MSVC -set_property(GLOBAL PROPERTY USE_FOLDERS ON) +function(group_sources) + # Enable the support for solution folders in MSVC + set_property(GLOBAL PROPERTY USE_FOLDERS ON) -# Put projects into solution folders in MSVC: -set_target_properties( - event_core_static - event_extra_static - expat - fmt - jsoncpp_lib - lua - luaexpat - mbedcrypto - mbedtls - mbedx509 - lsqlite - sqlite3 - SQLiteCpp - tolualib - zlib - PROPERTIES FOLDER Libraries -) - -# luaproxy not generated on anything else -if(WIN32) + # Put projects into solution folders in MSVC: set_target_properties( - luaproxy - PROPERTIES FOLDER Support + event_core_static + event_extra_static + expat + fmt + jsoncpp_lib + lua + luaexpat + mbedcrypto + mbedtls + mbedx509 + lsqlite + sqlite3 + SQLiteCpp + tolualib + zlib + PROPERTIES FOLDER Libraries ) -endif() -if(${BUILD_TOOLS}) - set_target_properties( - MCADefrag - ProtoProxy - PROPERTIES FOLDER Tools - ) -endif() + # luaproxy not generated on anything else + if(WIN32) + set_target_properties( + luaproxy + PROPERTIES FOLDER Support + ) + endif() + + if(${BUILD_TOOLS}) + set_target_properties( + MCADefrag + ProtoProxy + PROPERTIES FOLDER Tools + ) + endif() -# Put all files into one project, separate by the folders: -get_property(TARGET_SOURCE_FILES TARGET ${CMAKE_PROJECT_NAME} PROPERTY SOURCES) -source_group(TREE "${PROJECT_SOURCE_DIR}/src" FILES ${TARGET_SOURCE_FILES}) + # Put all files into one project, separate by the folders: + get_property(TARGET_SOURCE_FILES TARGET ${CMAKE_PROJECT_NAME} PROPERTY SOURCES) + source_group(TREE "${PROJECT_SOURCE_DIR}/src" FILES ${TARGET_SOURCE_FILES}) +endfunction() |