From 7da7fe63553311649c2b5eaa8d7338662300a1d2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Staff=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Fri, 5 Oct 2018 10:08:10 +0900 Subject: [PATCH] 'nncc_core' as a static library (#1754) This commit converts 'nncc_core' as a static library in order to permit the use of this library without installation. Signed-off-by: Jonghyun Park --- libs/core/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/core/CMakeLists.txt b/libs/core/CMakeLists.txt index 4a83c0b..688d476 100644 --- a/libs/core/CMakeLists.txt +++ b/libs/core/CMakeLists.txt @@ -3,7 +3,9 @@ file(GLOB_RECURSE SOURCES "src/*.cpp") file(GLOB_RECURSE TESTS "src/*.test.cpp") list(REMOVE_ITEM SOURCES ${TESTS}) -add_nncc_library(nncc_core SHARED ${HEADERS} ${SOURCES}) +# NOTE STATIC is deliberately used here to allow clients to use 'nncc_core' without installation +add_nncc_library(nncc_core STATIC ${HEADERS} ${SOURCES}) +set_target_properties(nncc_core PROPERTIES POSITION_INDEPENDENT_CODE ON) set_target_properties(nncc_core PROPERTIES LINKER_LANGUAGE CXX) target_include_directories(nncc_core PUBLIC include) target_link_libraries(nncc_core PUBLIC nncc_foundation) -- 2.7.4