diff --git a/irr/src/CMakeLists.txt b/irr/src/CMakeLists.txt index c752d7d31..f301b5d6a 100644 --- a/irr/src/CMakeLists.txt +++ b/irr/src/CMakeLists.txt @@ -312,6 +312,11 @@ set(link_includes # Source files set(IRRMESHLOADER + CB3DMeshFileLoader.h + CGLTFMeshFileLoader.h + COBJMeshFileLoader.h + CXMeshFileLoader.h + CB3DMeshFileLoader.cpp CGLTFMeshFileLoader.cpp COBJMeshFileLoader.cpp @@ -319,15 +324,25 @@ set(IRRMESHLOADER ) add_library(IRRMESHOBJ OBJECT + CMeshSceneNode.h + CAnimatedMeshSceneNode.h + SkinnedMesh.cpp CMeshSceneNode.cpp CAnimatedMeshSceneNode.cpp + ${IRRMESHLOADER} ) target_link_libraries(IRRMESHOBJ PUBLIC tiniergltf::tiniergltf) set(IRRDRVROBJ + CNullDriver.h + CGLXManager.h + CWGLManager.h + CEGLManager.h + CSDLManager.h + CNullDriver.cpp CGLXManager.cpp CWGLManager.cpp @@ -341,6 +356,11 @@ set(IRRDRVROBJ if(ENABLE_OPENGL) set(IRRDRVROBJ ${IRRDRVROBJ} + COpenGLCacheHandler.h + COpenGLDriver.h + COpenGLSLMaterialRenderer.h + COpenGLExtensionHandler.h + COpenGLCacheHandler.cpp COpenGLDriver.cpp COpenGLSLMaterialRenderer.cpp @@ -351,8 +371,11 @@ endif() # the unified drivers if(ENABLE_OPENGL3 OR ENABLE_GLES2) + file(GLOB IRRDRVR_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/OpenGL/*.h") + set(IRRDRVROBJ ${IRRDRVROBJ} + ${IRRDRVR_HDRS} OpenGL/Driver.cpp OpenGL/ExtensionHandler.cpp OpenGL/FixedPipelineRenderer.cpp @@ -365,6 +388,7 @@ endif() if(ENABLE_OPENGL3) set(IRRDRVROBJ ${IRRDRVROBJ} + OpenGL3/DriverGL3.h OpenGL3/DriverGL3.cpp ) endif() @@ -372,11 +396,20 @@ endif() if(ENABLE_GLES2) set(IRRDRVROBJ ${IRRDRVROBJ} + OpenGLES2/DriverGLES2.h OpenGLES2/DriverGLES2.cpp ) endif() set(IRRIMAGEOBJ + CColorConverter.h + CImage.h + CImageLoaderJPG.h + CImageLoaderPNG.h + CImageLoaderTGA.h + CImageWriterJPG.h + CImageWriterPNG.h + CColorConverter.cpp CImage.cpp CImageLoaderJPG.cpp @@ -387,12 +420,21 @@ set(IRRIMAGEOBJ ) add_library(IRRVIDEOOBJ OBJECT + CFPSCounter.h CFPSCounter.cpp ${IRRDRVROBJ} ${IRRIMAGEOBJ} ) add_library(IRRIOOBJ OBJECT + CFileList.h + CFileSystem.h + CLimitReadFile.h + CMemoryFile.h + CReadFile.h + CWriteFile.h + CZipReader.h + CFileList.cpp CFileSystem.cpp CLimitReadFile.cpp @@ -403,6 +445,14 @@ add_library(IRRIOOBJ OBJECT ) add_library(IRROTHEROBJ OBJECT + CIrrDeviceSDL.h + CIrrDeviceLinux.h + CIrrDeviceStub.h + CIrrDeviceWin32.h + CLogger.h + COSOperator.h + os.h + CIrrDeviceSDL.cpp CIrrDeviceLinux.cpp CIrrDeviceStub.cpp @@ -439,6 +489,22 @@ if(USE_XCURSOR) endif() add_library(IRRGUIOBJ OBJECT + CGUIButton.h + CGUICheckBox.h + CGUIComboBox.h + CGUIEditBox.h + CGUIEnvironment.h + CGUIFileOpenDialog.h + CGUIFont.h + CGUIImage.h + CGUIListBox.h + CGUIScrollBar.h + CGUISkin.h + CGUIStaticText.h + CGUITabControl.h + CGUISpriteBank.h + CGUIImageList.h + CGUIButton.cpp CGUICheckBox.cpp CGUIComboBox.cpp @@ -458,8 +524,21 @@ add_library(IRRGUIOBJ OBJECT # Library +file(GLOB_RECURSE IrrlichtMt_PUBLIC_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/../include/*.h") + # There have to be some sources in IrrlichtMt to workaround Cmake Xcode generator bug add_library(IrrlichtMt STATIC + ${IrrlichtMt_PUBLIC_HDRS} + + CBillboardSceneNode.h + CCameraSceneNode.h + CDummyTransformationSceneNode.h + CEmptySceneNode.h + CMeshManipulator.h + CSceneCollisionManager.h + CSceneManager.h + CMeshCache.h + CBillboardSceneNode.cpp CCameraSceneNode.cpp CDummyTransformationSceneNode.cpp diff --git a/lib/bitop/CMakeLists.txt b/lib/bitop/CMakeLists.txt index 2aec86f27..227e0f3d9 100644 --- a/lib/bitop/CMakeLists.txt +++ b/lib/bitop/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(bitop STATIC bit.cpp) +add_library(bitop STATIC bit.cpp bit.h) target_include_directories(bitop PRIVATE ${LUA_INCLUDE_DIR}) set(LUA_BIT_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE) diff --git a/lib/catch2/CMakeLists.txt b/lib/catch2/CMakeLists.txt index 252dc11e3..a07ac0e07 100644 --- a/lib/catch2/CMakeLists.txt +++ b/lib/catch2/CMakeLists.txt @@ -12,7 +12,7 @@ # - return os << duration.value() << ' ' << duration.unitsAsString(); # + return os << std::fixed << duration.value() << ' ' << duration.unitsAsString(); -add_library(catch2 STATIC catch_amalgamated.cpp) +add_library(catch2 STATIC catch_amalgamated.cpp catch_amalgamated.hpp) target_compile_definitions(catch2 PRIVATE CATCH_CONFIG_NOSTDOUT CATCH_AMALGAMATED_CUSTOM_MAIN) add_library(Catch2::Catch2 ALIAS catch2) target_include_directories(catch2 INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}") diff --git a/lib/gmp/CMakeLists.txt b/lib/gmp/CMakeLists.txt index f0604a43d..dd96ebce6 100644 --- a/lib/gmp/CMakeLists.txt +++ b/lib/gmp/CMakeLists.txt @@ -1,3 +1,3 @@ -add_library(gmp STATIC mini-gmp.c) +add_library(gmp STATIC mini-gmp.c mini-gmp.h) target_link_libraries(gmp) diff --git a/lib/jsoncpp/CMakeLists.txt b/lib/jsoncpp/CMakeLists.txt index cdd1a7ead..2c8ba2bc3 100644 --- a/lib/jsoncpp/CMakeLists.txt +++ b/lib/jsoncpp/CMakeLists.txt @@ -1,3 +1,3 @@ -add_library(jsoncpp STATIC jsoncpp.cpp) +add_library(jsoncpp STATIC jsoncpp.cpp json/json.h json/json-forwards.h) target_link_libraries(jsoncpp) diff --git a/lib/lua/src/CMakeLists.txt b/lib/lua/src/CMakeLists.txt index 2ca4f4168..66e547cf8 100644 --- a/lib/lua/src/CMakeLists.txt +++ b/lib/lua/src/CMakeLists.txt @@ -1,6 +1,8 @@ - # Lua core source files. +file(GLOB LUA_CORE_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") + set(LUA_CORE_SRC + ${LUA_CORE_HDRS} lapi.c lauxlib.c lbaselib.c diff --git a/lib/sha256/CMakeLists.txt b/lib/sha256/CMakeLists.txt index 555cb8ba9..c041ae3f3 100644 --- a/lib/sha256/CMakeLists.txt +++ b/lib/sha256/CMakeLists.txt @@ -1,6 +1,6 @@ project(sha256 C) -add_library(sha256 STATIC sha256.c) +add_library(sha256 STATIC sha256.c my_sha256.h) target_include_directories(sha256 INTERFACE .) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bc87ca070..0813a11dc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -445,8 +445,11 @@ set(independent_SRCS ${util_SRCS} ) +file(GLOB common_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") + # /!\ Consider carefully before adding files here /!\ set(common_SRCS + ${common_HDRS} clientdynamicinfo.cpp collision.cpp content_mapnode.cpp diff --git a/src/benchmark/CMakeLists.txt b/src/benchmark/CMakeLists.txt index bf2bf15db..20be91711 100644 --- a/src/benchmark/CMakeLists.txt +++ b/src/benchmark/CMakeLists.txt @@ -1,4 +1,6 @@ set (BENCHMARK_SRCS + ${CMAKE_CURRENT_SOURCE_DIR}/benchmark.h + ${CMAKE_CURRENT_SOURCE_DIR}/benchmark.cpp ${CMAKE_CURRENT_SOURCE_DIR}/benchmark_activeobjectmgr.cpp ${CMAKE_CURRENT_SOURCE_DIR}/benchmark_lighting.cpp diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index b11e6ee6f..a09a0fb3f 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -23,7 +23,10 @@ if(USE_SOUND) PARENT_SCOPE) endif() +file(GLOB_RECURSE client_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") + set(client_SRCS + ${client_HDRS} ${sound_SRCS} ${CMAKE_CURRENT_SOURCE_DIR}/meshgen/collector.cpp ${CMAKE_CURRENT_SOURCE_DIR}/render/anaglyph.cpp diff --git a/src/content/CMakeLists.txt b/src/content/CMakeLists.txt index 2aefd40a4..923a383df 100644 --- a/src/content/CMakeLists.txt +++ b/src/content/CMakeLists.txt @@ -1,4 +1,7 @@ +file(GLOB content_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") + set(content_SRCS + ${content_HDRS} ${CMAKE_CURRENT_SOURCE_DIR}/content.cpp ${CMAKE_CURRENT_SOURCE_DIR}/mod_configuration.cpp ${CMAKE_CURRENT_SOURCE_DIR}/mods.cpp diff --git a/src/database/CMakeLists.txt b/src/database/CMakeLists.txt index e9d157c29..ad2105aa3 100644 --- a/src/database/CMakeLists.txt +++ b/src/database/CMakeLists.txt @@ -1,4 +1,7 @@ +file(GLOB database_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") + set(database_SRCS + ${database_HDRS} ${CMAKE_CURRENT_SOURCE_DIR}/database.cpp ${CMAKE_CURRENT_SOURCE_DIR}/database-dummy.cpp ${CMAKE_CURRENT_SOURCE_DIR}/database-files.cpp diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 0c1db2ae0..a4faa1f22 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -1,4 +1,7 @@ +file(GLOB gui_HDRS "*.h") + set(gui_SRCS + ${gui_HDRS} ${CMAKE_CURRENT_SOURCE_DIR}/guiAnimatedImage.cpp ${CMAKE_CURRENT_SOURCE_DIR}/guiBackgroundImage.cpp ${CMAKE_CURRENT_SOURCE_DIR}/guiBox.cpp diff --git a/src/irrlicht_changes/CMakeLists.txt b/src/irrlicht_changes/CMakeLists.txt index 19f431af3..ee04d4eb3 100644 --- a/src/irrlicht_changes/CMakeLists.txt +++ b/src/irrlicht_changes/CMakeLists.txt @@ -1,5 +1,8 @@ if (BUILD_CLIENT) + file(GLOB client_irrlicht_changes_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") + set(client_irrlicht_changes_SRCS + ${client_irrlicht_changes_HDRS} ${CMAKE_CURRENT_SOURCE_DIR}/static_text.cpp ${CMAKE_CURRENT_SOURCE_DIR}/CGUITTFont.cpp ) diff --git a/src/mapgen/CMakeLists.txt b/src/mapgen/CMakeLists.txt index e74bd85db..947709654 100644 --- a/src/mapgen/CMakeLists.txt +++ b/src/mapgen/CMakeLists.txt @@ -1,4 +1,7 @@ +file(GLOB mapgen_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") + set(mapgen_SRCS + ${mapgen_HDRS} ${CMAKE_CURRENT_SOURCE_DIR}/cavegen.cpp ${CMAKE_CURRENT_SOURCE_DIR}/dungeongen.cpp ${CMAKE_CURRENT_SOURCE_DIR}/mapgen_carpathian.cpp diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt index d9e674304..5bbfa23f0 100644 --- a/src/network/CMakeLists.txt +++ b/src/network/CMakeLists.txt @@ -1,4 +1,7 @@ +file(GLOB_RECURSE common_network_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") + set(common_network_SRCS + ${common_network_HDRS} ${CMAKE_CURRENT_SOURCE_DIR}/address.cpp ${CMAKE_CURRENT_SOURCE_DIR}/connection.cpp ${CMAKE_CURRENT_SOURCE_DIR}/mtp/impl.cpp diff --git a/src/script/CMakeLists.txt b/src/script/CMakeLists.txt index fd46f522f..b33104942 100644 --- a/src/script/CMakeLists.txt +++ b/src/script/CMakeLists.txt @@ -3,9 +3,13 @@ add_subdirectory(cpp_api) add_subdirectory(lua_api) # Used by server and client +file(GLOB common_SCRIPT_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") + set(common_SCRIPT_SRCS + ${common_SCRIPT_HDRS} ${CMAKE_CURRENT_SOURCE_DIR}/scripting_server.cpp ${CMAKE_CURRENT_SOURCE_DIR}/scripting_emerge.cpp + ${common_SCRIPT_COMMON_SRCS} ${common_SCRIPT_CPP_API_SRCS} ${common_SCRIPT_LUA_API_SRCS} @@ -16,6 +20,7 @@ set(client_SCRIPT_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/scripting_mainmenu.cpp ${CMAKE_CURRENT_SOURCE_DIR}/scripting_client.cpp ${CMAKE_CURRENT_SOURCE_DIR}/scripting_pause_menu.cpp + ${client_SCRIPT_COMMON_SRCS} ${client_SCRIPT_CPP_API_SRCS} ${client_SCRIPT_LUA_API_SRCS} diff --git a/src/script/common/CMakeLists.txt b/src/script/common/CMakeLists.txt index f771861d7..ae42a1480 100644 --- a/src/script/common/CMakeLists.txt +++ b/src/script/common/CMakeLists.txt @@ -1,4 +1,7 @@ +file(GLOB common_SCRIPT_COMMON_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") + set(common_SCRIPT_COMMON_SRCS + ${common_SCRIPT_COMMON_HDRS} ${CMAKE_CURRENT_SOURCE_DIR}/c_content.cpp ${CMAKE_CURRENT_SOURCE_DIR}/c_converter.cpp ${CMAKE_CURRENT_SOURCE_DIR}/c_internal.cpp diff --git a/src/script/cpp_api/CMakeLists.txt b/src/script/cpp_api/CMakeLists.txt index 123364141..713dbe28b 100644 --- a/src/script/cpp_api/CMakeLists.txt +++ b/src/script/cpp_api/CMakeLists.txt @@ -1,4 +1,7 @@ +file(GLOB common_SCRIPT_CPP_API_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") + set(common_SCRIPT_CPP_API_SRCS + ${common_SCRIPT_CPP_API_HDRS} ${CMAKE_CURRENT_SOURCE_DIR}/s_async.cpp ${CMAKE_CURRENT_SOURCE_DIR}/s_base.cpp ${CMAKE_CURRENT_SOURCE_DIR}/s_entity.cpp diff --git a/src/script/lua_api/CMakeLists.txt b/src/script/lua_api/CMakeLists.txt index ef1be9525..14787eb34 100644 --- a/src/script/lua_api/CMakeLists.txt +++ b/src/script/lua_api/CMakeLists.txt @@ -1,4 +1,7 @@ +file(GLOB common_SCRIPT_LUA_API_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") + set(common_SCRIPT_LUA_API_SRCS + ${common_SCRIPT_LUA_API_HDRS} ${CMAKE_CURRENT_SOURCE_DIR}/l_areastore.cpp ${CMAKE_CURRENT_SOURCE_DIR}/l_auth.cpp ${CMAKE_CURRENT_SOURCE_DIR}/l_base.cpp diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index 98318e93d..ae9a319b3 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -1,4 +1,7 @@ +file(GLOB common_server_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") + set(common_server_SRCS + ${common_server_HDRS} ${CMAKE_CURRENT_SOURCE_DIR}/activeobjectmgr.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ban.cpp ${CMAKE_CURRENT_SOURCE_DIR}/blockmodifier.cpp diff --git a/src/threading/CMakeLists.txt b/src/threading/CMakeLists.txt index 6771b715f..56f0d0c0a 100644 --- a/src/threading/CMakeLists.txt +++ b/src/threading/CMakeLists.txt @@ -1,4 +1,7 @@ +file(GLOB threading_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") + set(threading_SRCS + ${threading_HDRS} ${CMAKE_CURRENT_SOURCE_DIR}/event.cpp ${CMAKE_CURRENT_SOURCE_DIR}/thread.cpp ${CMAKE_CURRENT_SOURCE_DIR}/semaphore.cpp diff --git a/src/unittest/CMakeLists.txt b/src/unittest/CMakeLists.txt index 159e816c7..c31be6e4e 100644 --- a/src/unittest/CMakeLists.txt +++ b/src/unittest/CMakeLists.txt @@ -1,4 +1,7 @@ +file(GLOB unittest_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") + set (UNITTEST_SRCS + ${unittest_HDRS} ${CMAKE_CURRENT_SOURCE_DIR}/test.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test_address.cpp ${CMAKE_CURRENT_SOURCE_DIR}/test_authdatabase.cpp diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt index 7fc662571..0cbf0eaa1 100644 --- a/src/util/CMakeLists.txt +++ b/src/util/CMakeLists.txt @@ -1,4 +1,7 @@ +file(GLOB util_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") + set(util_SRCS + ${util_HDRS} ${CMAKE_CURRENT_SOURCE_DIR}/areastore.cpp ${CMAKE_CURRENT_SOURCE_DIR}/auth.cpp ${CMAKE_CURRENT_SOURCE_DIR}/base64.cpp