From bb70787645411929699a83da4e444371427eeb76 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 25 Mar 2020 10:44:31 -0500 Subject: [PATCH] cleaned up handling of R package --- CMakeLists.txt | 6 ++++-- windows/LightGBM.vcxproj | 3 --- windows/LightGBM.vcxproj.filters | 9 --------- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7782d636f85e..e208f3460c14 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -235,14 +235,16 @@ file(GLOB SOURCES ) add_executable(lightgbm src/main.cpp ${SOURCES}) +set(SOURCES "${SOURCES} src/c_api.cpp") -add_library(_lightgbm SHARED src/c_api.cpp ${SOURCES}) # Only build the R part of the library if building for # use with the R package if(BUILD_FOR_R) - add_library(_lightgbm SHARED src/lightgbm_R.cpp) + set(SOURCES "${SOURCES} lightgbm_R.cpp") endif(BUILD_FOR_R) +add_library(_lightgbm SHARED ${SOURCES}) + if(MSVC) set_target_properties(_lightgbm PROPERTIES OUTPUT_NAME "lib_lightgbm") endif(MSVC) diff --git a/windows/LightGBM.vcxproj b/windows/LightGBM.vcxproj index 6e15af50c5f6..0f814a341977 100644 --- a/windows/LightGBM.vcxproj +++ b/windows/LightGBM.vcxproj @@ -237,13 +237,11 @@ - - @@ -308,7 +306,6 @@ - diff --git a/windows/LightGBM.vcxproj.filters b/windows/LightGBM.vcxproj.filters index 11852bcb986d..f122c865afee 100644 --- a/windows/LightGBM.vcxproj.filters +++ b/windows/LightGBM.vcxproj.filters @@ -183,12 +183,6 @@ src\metric - - include\LightGBM - - - include\LightGBM - src\boosting @@ -296,9 +290,6 @@ src\boosting - - src - src\boosting