Skip to content

Commit

Permalink
fix install location
Browse files Browse the repository at this point in the history
  • Loading branch information
isucan committed Dec 11, 2013
1 parent b96aacb commit f2f61e5
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,20 @@ message (STATUS "${PROJECT_NAME} version ${URDF_VERSION}")

include(GNUInstallDirs)

# hack: by default this would be 'lib/x86_64-linux-gnu'
set(CMAKE_INSTALL_LIBDIR lib)

# set the default build type
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

# If compiler support symbol visibility, enable it.
#include(CheckCCompilerFlag)
#check_c_compiler_flag(-fvisibility=hidden HAS_VISIBILITY)
#if (HAS_VISIBILITY)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
#endif()
include(CheckCCompilerFlag)
check_c_compiler_flag(-fvisibility=hidden HAS_VISIBILITY)
if (HAS_VISIBILITY)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
endif()

# This shouldn't be necessary, but there has been trouble
# with MSVC being set off, but MSVCXX ON.
Expand Down

2 comments on commit f2f61e5

@isucan
Copy link
Contributor Author

@isucan isucan commented on f2f61e5 Jan 9, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I put in that hack was to get the release working. I think some packages were not finding the lib. I could have messed something else up, so feel free to undo this change. I would prefer fixing this actually.

@j-rivero
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GNUInstallDirs will respect the variable is you set it up before, so something like:

cmake .. -DCMAKE_INSTALL_LIBDIR=lib

when running the release would be enough and will respect the GNUInstallDirs and other values set manually.

Please sign in to comment.