Skip to content

Commit 16ca966

Browse files
committed
Add position-independent code directive (paceholder#141)
1 parent ddfdaa9 commit 16ca966

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

CMakeLists.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ qt5_add_resources(RESOURCES ./resources/resources.qrc)
2121
# We'll have to manually specify some files
2222
set(CMAKE_AUTOMOC ON)
2323

24-
# If we want to give the option to build a static library,
25-
# leave off SHARED here and use BUILD_SHARED_LIBS to
26-
# choose whether to add -D NODE_EDITOR_SHARED
27-
add_library(nodes SHARED
24+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
25+
26+
set(CPP_SOURCE_FILES
2827
src/Connection.cpp
2928
src/ConnectionBlurEffect.cpp
3029
src/ConnectionGeometry.cpp
@@ -46,6 +45,13 @@ add_library(nodes SHARED
4645
src/NodeStyle.cpp
4746
src/Properties.cpp
4847
src/StyleCollection.cpp
48+
)
49+
50+
# If we want to give the option to build a static library,
51+
# leave off SHARED here and use BUILD_SHARED_LIBS to
52+
# choose whether to add -D NODE_EDITOR_SHARED
53+
add_library(nodes SHARED
54+
${CPP_SOURCE_FILES}
4955
${RESOURCES}
5056
)
5157

0 commit comments

Comments
 (0)