From 2d496324c514665f2c48873527a36ac0c24241a1 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 24 Mar 2020 23:08:44 -0500 Subject: [PATCH] Update CMakeLists.txt Co-Authored-By: Nikita Titov --- CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f82722d09a0..7782d636f85e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -236,12 +236,11 @@ file(GLOB SOURCES add_executable(lightgbm src/main.cpp ${SOURCES}) +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/c_api.cpp src/lightgbm_R.cpp ${SOURCES}) -else() - add_library(_lightgbm SHARED src/c_api.cpp ${SOURCES}) + add_library(_lightgbm SHARED src/lightgbm_R.cpp) endif(BUILD_FOR_R) if(MSVC)