Skip to content

Commit 230af3c

Browse files
jbltxpaceholder
authored andcommitted
Add cmake option to build as static or shared lib (paceholder#208)
1 parent 4ad45ed commit 230af3c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ set(NE_DEVELOPER_DEFAULTS "${is_root_project}" CACHE BOOL "Turns on default sett
1717

1818
option(BUILD_TESTING "Build tests" "${NE_DEVELOPER_DEFAULTS}")
1919
option(BUILD_EXAMPLES "Build Examples" "${NE_DEVELOPER_DEFAULTS}")
20+
option(BUILD_SHARED_LIBS "Build as shared library" ON)
2021
option(NE_FORCE_TEST_COLOR "Force colorized unit test output" OFF)
2122

2223
enable_testing()
@@ -70,9 +71,8 @@ set(CPP_SOURCE_FILES
7071
)
7172

7273
# If we want to give the option to build a static library,
73-
# leave off SHARED here and use BUILD_SHARED_LIBS to
74-
# choose whether to add -D NODE_EDITOR_SHARED
75-
add_library(nodes SHARED
74+
# set BUILD_SHARED_LIBS option to OFF
75+
add_library(nodes
7676
${CPP_SOURCE_FILES}
7777
${RESOURCES}
7878
)

0 commit comments

Comments
 (0)