Skip to content

Commit

Permalink
Set LIBRARY_OUTPUT_PATH if catkin found, not if undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
adeguet1 committed Feb 11, 2015
1 parent e38cea6 commit 52d307b
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ if (cisst_FOUND_AS_REQUIRED)
# load cisst configuration
include (${CISST_USE_FILE})

# where to save the libraries
if (NOT DEFINED LIBRARY_OUTPUT_PATH)
# catkin/ROS paths
cisst_is_catkin_build (sawTextToSpeech_IS_CATKIN_BUILT)
if (sawTextToSpeech_IS_CATKIN_BUILT)
set (sawTextToSpeech_CONFIG_FILE_DIR "${CATKIN_DEVEL_PREFIX}/cmake")
set (LIBRARY_OUTPUT_PATH "${sawTextToSpeech_BINARY_DIR}/lib")
else ()
set (sawTextToSpeech_CONFIG_FILE_DIR "${sawTextToSpeech_BINARY_DIR}")
endif ()

# create/configure file for find_package (sawTextToSpeech)
Expand Down Expand Up @@ -55,13 +59,6 @@ if (cisst_FOUND_AS_REQUIRED)
set_property (TARGET sawTextToSpeech PROPERTY FOLDER "sawTextToSpeech")
cisst_target_link_libraries (sawTextToSpeech ${REQUIRED_CISST_LIBRARIES})

cisst_is_catkin_build (sawTextToSpeech_IS_CATKIN_BUILT)
if (sawTextToSpeech_IS_CATKIN_BUILT)
set (sawTextToSpeech_CONFIG_FILE_DIR "${CATKIN_DEVEL_PREFIX}/cmake")
else ()
set (sawTextToSpeech_CONFIG_FILE_DIR "${sawTextToSpeech_BINARY_DIR}")
endif ()

configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/sawTextToSpeechConfig.cmake.in"
"${sawTextToSpeech_CONFIG_FILE_DIR}/sawTextToSpeechConfig.cmake"
@ONLY@)
Expand Down

0 comments on commit 52d307b

Please sign in to comment.