Skip to content

Commit

Permalink
cleaned up cmake code slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
davisking committed Oct 14, 2014
1 parent 5e9052d commit 05d7aa8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dlib/add_python_module
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ else()
endif()


set(CMAKE_POSITION_INDEPENDENT_CODE True)
# Just setting CMAKE_POSITION_INDEPENDENT_CODE should be enough to set -fPIC
# for GCC but sometimes it still doesn't get set, so make sure it does.
if (CMAKE_COMPILER_IS_GNUCXX)
# Just setting CMAKE_POSITION_INDEPENDENT_CODE should be enough to set
# -fPIC for GCC but sometimes it still doesn't get set, so make sure it
# does.
add_definitions("-fPIC")
else()
set(CMAKE_POSITION_INDEPENDENT_CODE True)
endif()

# include dlib so we can link against it
Expand Down

0 comments on commit 05d7aa8

Please sign in to comment.