Skip to content

Commit 47fac5f

Browse files
added needed -fPIC compilation option for Linux
1 parent 76de130 commit 47fac5f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

CMakeLists.txt

+8-7
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ OPTION(BUILD_VIEWER_APPLICATION "Build the viewer example application" ON)
2020
OPTION(BUILD_STATIC_LIBRARY "Build static library" ON)
2121

2222
IF(NOT WIN32)
23-
IF("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
24-
IF(CMAKE_COMPILER_IS_GNUCXX)
25-
SET_PROPERTY(DIRECTORY APPEND PROPERTY
26-
COMPILE_DEFINITIONS $<$<CONFIG:Debug>:_DEBUG>
27-
)
28-
ENDIF()
29-
ENDIF()
23+
IF("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
24+
IF(CMAKE_COMPILER_IS_GNUCXX)
25+
SET_PROPERTY(DIRECTORY APPEND PROPERTY
26+
COMPILE_DEFINITIONS $<$<CONFIG:Debug>:_DEBUG>
27+
)
28+
ENDIF()
29+
ENDIF()
30+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
3031
ELSE(NOT WIN32)
3132
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
3233
ENDIF(NOT WIN32)

0 commit comments

Comments
 (0)