diff --git a/CMakeLists.txt b/CMakeLists.txt
index 214abfacf87f94a096eb3b549020a5fb8b825467..66bea20472df695a4dca2e3447dfd15aec4b4998 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,8 +5,8 @@
 cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
 
 set(CMAKE_MODULE_PATH
-    ${CMAKE_SOURCE_DIR}/cmake/modules    # CMake modules specific for BornAgain
     ${CMAKE_SOURCE_DIR}/cmake/extensions # CMake modules for use in various projects
+    ${CMAKE_SOURCE_DIR}/cmake/
     )
 set(CONFIGURABLES_DIR ${CMAKE_SOURCE_DIR}/cmake/configurables)
 
@@ -64,20 +64,30 @@ if(ALLCONFIG)
 endif()
 
 # include CMake macros and functions
+#--- Setup details depending on the major platform type ---
+
+if(CMAKE_SYSTEM_NAME MATCHES Linux)
+    include(BornAgain/Linux)
+elseif(APPLE)
+    include(BornAgain/MacOS)
+elseif(WIN32)
+    include(BornAgain/Windows)
+endif()
+
 include(GetFilenameComponent) # overwrite CMake command
-include(Directories)
-include(CheckCompiler)
-include(Dependences)
+include(BornAgain/Directories)
+include(BornAgain/Compiler)
+include(BornAgain/Dependences)
 if(ZERO_TOLERANCE)
     string(APPEND CMAKE_CXX_FLAGS " -Werror -Wfatal-errors")
 endif()
 if(BORNAGAIN_GUI)
-    include(SearchQt)
+    include(BornAgain/Qt)
     string(APPEND CMAKE_CXX_FLAGS " -DHAVE_QT=ON")
 endif()
-include(BornAgainConfiguration)
-include(GeneratePythonDocs)
-include(BALineLength)
+include(BornAgain/Config)
+include(BornAgain/PythonDocs)
+include(BornAgain/LineLength)
 
 # debug optimization
 if(BORNAGAIN_DEBUG_OPTIMIZATION)
@@ -87,7 +97,7 @@ endif()
 # code coverage analysis
 if(BORNAGAIN_COVERAGE)
   include(CoverageFunction)
-  include(BACoverage)
+  include(BornAgain/Coverage)
 endif()
 
 # recurse into the given subdirectories
@@ -133,4 +143,4 @@ add_subdirectory(Tests/Functional)
 add_subdirectory(cmake)
 
 # make package targets
-include(BornAgainCPack)
+include(BornAgain/Pack)
diff --git a/cmake/modules/CheckCompiler.cmake b/cmake/BornAgain/Compiler.cmake
similarity index 87%
rename from cmake/modules/CheckCompiler.cmake
rename to cmake/BornAgain/Compiler.cmake
index 1d6bd9de095e34075b21a30c3d68d927b5f9aa13..d86a4eb6a53d6caa43e20fcfc0012ebb086f034b 100644
--- a/cmake/modules/CheckCompiler.cmake
+++ b/cmake/BornAgain/Compiler.cmake
@@ -14,16 +14,6 @@ message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
 
 find_package(Threads)
 
-#--- Setup details depending on the major platform type ---
-
-if(CMAKE_SYSTEM_NAME MATCHES Linux)
-    include(SetUpLinux)
-elseif(APPLE)
-    include(SetUpMacOS)
-elseif(WIN32)
-    include(SetUpWindows)
-endif()
-
 #--- Print the final compiler flags ---
 
 message(STATUS "BornAgain Platform: ${BORNAGAIN_PLATFORM}")
diff --git a/cmake/modules/BornAgainConfiguration.cmake b/cmake/BornAgain/Config.cmake
similarity index 100%
rename from cmake/modules/BornAgainConfiguration.cmake
rename to cmake/BornAgain/Config.cmake
diff --git a/cmake/modules/BACoverage.cmake b/cmake/BornAgain/Coverage.cmake
similarity index 100%
rename from cmake/modules/BACoverage.cmake
rename to cmake/BornAgain/Coverage.cmake
diff --git a/cmake/modules/Dependences.cmake b/cmake/BornAgain/Dependences.cmake
similarity index 100%
rename from cmake/modules/Dependences.cmake
rename to cmake/BornAgain/Dependences.cmake
diff --git a/cmake/modules/Directories.cmake b/cmake/BornAgain/Directories.cmake
similarity index 100%
rename from cmake/modules/Directories.cmake
rename to cmake/BornAgain/Directories.cmake
diff --git a/cmake/modules/BALineLength.cmake b/cmake/BornAgain/LineLength.cmake
similarity index 100%
rename from cmake/modules/BALineLength.cmake
rename to cmake/BornAgain/LineLength.cmake
diff --git a/cmake/modules/SetUpLinux.cmake b/cmake/BornAgain/Linux.cmake
similarity index 100%
rename from cmake/modules/SetUpLinux.cmake
rename to cmake/BornAgain/Linux.cmake
diff --git a/cmake/modules/SetUpMacOS.cmake b/cmake/BornAgain/MacOS.cmake
similarity index 100%
rename from cmake/modules/SetUpMacOS.cmake
rename to cmake/BornAgain/MacOS.cmake
diff --git a/cmake/modules/BornAgainCPack.cmake b/cmake/BornAgain/Pack.cmake
similarity index 95%
rename from cmake/modules/BornAgainCPack.cmake
rename to cmake/BornAgain/Pack.cmake
index b05f1002bd54b03d2bc8d5a03b2472b803492582..1970a78bd0e9cac4554ef895befad5148100d72f 100644
--- a/cmake/modules/BornAgainCPack.cmake
+++ b/cmake/BornAgain/Pack.cmake
@@ -19,11 +19,11 @@ endif()
 
 
 if(WIN32)
-    include(CPackWindows)
+    include(BornAgain/PackWindows)
 elseif(APPLE)
-    include(CPackApple)
+    include(BornAgain/PackMacOS)
 elseif(UNIX AND BUILD_DEBIAN) # one can build debian package only on UNIX system
-    include(CPackDebian)
+    include(BornAgain/PackDebian)
 else()
   set(CPACK_GENERATOR "TGZ")
 endif()
diff --git a/cmake/modules/CPackDebian.cmake b/cmake/BornAgain/PackDebian.cmake
similarity index 100%
rename from cmake/modules/CPackDebian.cmake
rename to cmake/BornAgain/PackDebian.cmake
diff --git a/cmake/modules/CPackApple.cmake b/cmake/BornAgain/PackMacOS.cmake
similarity index 100%
rename from cmake/modules/CPackApple.cmake
rename to cmake/BornAgain/PackMacOS.cmake
diff --git a/cmake/modules/CPackWindows.cmake b/cmake/BornAgain/PackWindows.cmake
similarity index 100%
rename from cmake/modules/CPackWindows.cmake
rename to cmake/BornAgain/PackWindows.cmake
diff --git a/cmake/modules/GeneratePythonDocs.cmake b/cmake/BornAgain/PythonDocs.cmake
similarity index 100%
rename from cmake/modules/GeneratePythonDocs.cmake
rename to cmake/BornAgain/PythonDocs.cmake
diff --git a/cmake/modules/SearchQt.cmake b/cmake/BornAgain/Qt.cmake
similarity index 100%
rename from cmake/modules/SearchQt.cmake
rename to cmake/BornAgain/Qt.cmake
diff --git a/cmake/modules/SetUpWindows.cmake b/cmake/BornAgain/Windows.cmake
similarity index 100%
rename from cmake/modules/SetUpWindows.cmake
rename to cmake/BornAgain/Windows.cmake
diff --git a/cmake/modules/NSIS.InstallOptions.ini.in b/cmake/configurables/NSIS.InstallOptions.ini.in
similarity index 100%
rename from cmake/modules/NSIS.InstallOptions.ini.in
rename to cmake/configurables/NSIS.InstallOptions.ini.in
diff --git a/cmake/modules/NSIS.template.in b/cmake/configurables/NSIS.template.in
similarity index 100%
rename from cmake/modules/NSIS.template.in
rename to cmake/configurables/NSIS.template.in