Skip to content
Snippets Groups Projects
Commit 876d736d authored by Marcel Loose's avatar Marcel Loose :sunglasses:
Browse files

Task #5921: lofar_add_library() macro now works both with CMake 2.8.12 and...

Task #5921: lofar_add_library() macro now works both with CMake 2.8.12 and earlier versions without policy warning. Also removed old 'if(NOT APPLE) .. endif()' code, which is probably no longer needed.
parent 510745c9
No related branches found
No related tags found
No related merge requests found
......@@ -93,13 +93,15 @@ if(NOT DEFINED LOFAR_MACROS_INCLUDED)
if(NOT "${ARGN}" MATCHES "^MODULE")
set_property(GLOBAL APPEND PROPERTY ${PACKAGE_NAME}_LIBRARIES ${_name})
endif(NOT "${ARGN}" MATCHES "^MODULE")
target_link_libraries(${_name} PRIVATE
${${PACKAGE_NAME}_LINK_LIBRARIES} ${LOFAR_EXTRA_LIBRARIES})
# For unknown reasons, this seems to cause havoc on Apple.
if(NOT APPLE)
target_link_libraries(${_name} PUBLIC
if(${CMAKE_VERSION} VERSION_LESS 2.8.12)
target_link_libraries(${_name}
${${PACKAGE_NAME}_LINK_LIBRARIES} ${LOFAR_EXTRA_LIBRARIES})
target_link_libraries(${_name} LINK_INTERFACE_LIBRARIES
${${PACKAGE_NAME}_LINK_LIBRARIES})
endif(NOT APPLE)
else(${CMAKE_VERSION} VERSION_LESS 2.8.12)
target_link_libraries(${_name} PRIVATE ${LOFAR_EXTRA_LIBRARIES})
target_link_libraries(${_name} PUBLIC ${${PACKAGE_NAME}_LINK_LIBRARIES})
endif(${CMAKE_VERSION} VERSION_LESS 2.8.12)
# set_target_properties(${_name} PROPERTIES
# VERSION ${${PACKAGE_NAME}_VERSION}
# OUTPUT_NAME lofar_${_name})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment