From 8a4bd56831bd2d15a679ae8a749587afc0fa3ae5 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de> Date: Fri, 3 Jul 2020 15:59:25 +0200 Subject: [PATCH] CMake: don't include header files in source lists --- Core/CMakeLists.txt | 2 +- Fit/CMakeLists.txt | 3 +-- GUI/ba3d/ba3d/CMakeLists.txt | 3 +-- GUI/main/CMakeLists.txt | 2 +- ThirdParty/Fit/RootMinimizers/CMakeLists.txt | 12 +----------- 5 files changed, 5 insertions(+), 17 deletions(-) diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt index 02d88fb23ba..9886baddede 100644 --- a/Core/CMakeLists.txt +++ b/Core/CMakeLists.txt @@ -134,7 +134,7 @@ endif() # --- making library --------- -add_library(${library_name} SHARED ${include_files} ${source_files}) +add_library(${library_name} SHARED ${source_files}) set_target_properties(${library_name} PROPERTIES PREFIX ${libprefix} SUFFIX ${libsuffix}) set(${library_name}_LIBRARY_TYPE SHARED) diff --git a/Fit/CMakeLists.txt b/Fit/CMakeLists.txt index bf58a603324..84d9c889b9b 100644 --- a/Fit/CMakeLists.txt +++ b/Fit/CMakeLists.txt @@ -88,7 +88,6 @@ if(BORNAGAIN_PYTHON) endif() list(APPEND source_files "${AUTO_DIR}/libBornAgainFit_wrap.cpp") - #list(APPEND include_files "${AUTO_DIR}/libBornAgainFit_wrap.h") endif() @@ -98,7 +97,7 @@ if(WIN32) endif() # --- making library --------- -add_library(${library_name} SHARED ${include_files} ${source_files}) +add_library(${library_name} SHARED ${source_files}) set_target_properties(${library_name} PROPERTIES PREFIX ${libprefix} SUFFIX ${libsuffix}) set(${library_name}_LIBRARY_TYPE SHARED) diff --git a/GUI/ba3d/ba3d/CMakeLists.txt b/GUI/ba3d/ba3d/CMakeLists.txt index 271d8a613d9..607c19d8981 100644 --- a/GUI/ba3d/ba3d/CMakeLists.txt +++ b/GUI/ba3d/ba3d/CMakeLists.txt @@ -9,9 +9,8 @@ set(resource_files ) qt5_add_resources(RC_SHADERS ${resource_files}) -add_library (${lib} STATIC ${source_files} ${include_files} ${RC_SHADERS}) +add_library (${lib} STATIC ${source_files} ${RC_SHADERS}) target_link_libraries (${lib} Qt5::Core Qt5::Widgets Qt5::OpenGL ) - diff --git a/GUI/main/CMakeLists.txt b/GUI/main/CMakeLists.txt index 94efc3a46c2..acaec2e6e2f 100644 --- a/GUI/main/CMakeLists.txt +++ b/GUI/main/CMakeLists.txt @@ -37,7 +37,7 @@ endif() # ----------------------------------------------------------------------------- add_executable(${executable_name} ${executable_options} - ${source_files} ${include_files} + ${source_files} ${system_addons}) diff --git a/ThirdParty/Fit/RootMinimizers/CMakeLists.txt b/ThirdParty/Fit/RootMinimizers/CMakeLists.txt index db57ab1cd4c..da4fd5b621f 100644 --- a/ThirdParty/Fit/RootMinimizers/CMakeLists.txt +++ b/ThirdParty/Fit/RootMinimizers/CMakeLists.txt @@ -19,16 +19,6 @@ file(GLOB source_files "base/*.cxx" ) -file(GLOB include_files - "base/*.h" - "Minuit2/*.h" - "Math/*.h" - "mathcore/Math/*.h" - "Fit/*.h" - "TMVA/*.h" - "base/*.h" -) - # --- definitions --------- add_definitions(-DWARNINGMSG) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMATH_NO_PLUGIN_MANAGER -DHAS_MINUIT2 -DR__HAS_MATHMORE") @@ -39,7 +29,7 @@ else() endif() # --- making library ------------ -add_library(${library_name} STATIC ${source_files} ${include_files}) +add_library(${library_name} STATIC ${source_files}) set(${library_name}_INCLUDE_DIRS ${include_dirs} CACHE INTERNAL "") set(${library_name}_LIBRARY ${library_name} CACHE INTERNAL "") -- GitLab