1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 20:20:35 +00:00

fixes for MacOS

This commit is contained in:
Carles Fernandez 2016-01-13 11:04:32 +01:00
parent 97ed762964
commit bbdf52dbed
2 changed files with 14 additions and 20 deletions

View File

@ -53,21 +53,17 @@ add_executable(volk_gnsssdr_profile
${CMAKE_SOURCE_DIR}/lib/qa_utils.cc ${CMAKE_SOURCE_DIR}/lib/qa_utils.cc
) )
if(ENABLE_STATIC_LIBS)
if(OS_IS_MACOSX)
target_link_libraries(volk_gnsssdr_profile volk_gnsssdr ${Boost_LIBRARIES} ${Clang_required_link} ${orc_lib})
elseif(OS_IS_MACOSX)
if(ENABLE_STATIC_LIBS)
target_link_libraries(volk_gnsssdr_profile volk_gnsssdr_static ${Boost_LIBRARIES} ${Clang_required_link} ${orc_lib}) target_link_libraries(volk_gnsssdr_profile volk_gnsssdr_static ${Boost_LIBRARIES} ${Clang_required_link} ${orc_lib})
if(NOT APPLE)
set_target_properties(volk_gnsssdr_profile PROPERTIES LINK_FLAGS "-static") set_target_properties(volk_gnsssdr_profile PROPERTIES LINK_FLAGS "-static")
else(ENABLE_STATIC_LIBS) endif(NOT APPLE)
add_dependencies(volk_gnsssdr_profile volk_gnsssdr-static)
else(ENABLE_STATIC_LIBS)
target_link_libraries(volk_gnsssdr_profile volk_gnsssdr ${Boost_LIBRARIES} ${Clang_required_link} ${orc_lib}) target_link_libraries(volk_gnsssdr_profile volk_gnsssdr ${Boost_LIBRARIES} ${Clang_required_link} ${orc_lib})
endif(ENABLE_STATIC_LIBS) add_dependencies(volk_gnsssdr_profile volk_gnsssdr)
endif(OS_IS_MACOSX) endif(ENABLE_STATIC_LIBS)
add_dependencies(volk_gnsssdr_profile volk_gnsssdr)
if(ENABLE_STRIP) if(ENABLE_STRIP)
if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32) if(CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)

View File

@ -533,22 +533,20 @@ if(MSVC)
set_source_files_properties(${volk_gnsssdr_sources} PROPERTIES LANGUAGE CXX) set_source_files_properties(${volk_gnsssdr_sources} PROPERTIES LANGUAGE CXX)
endif() endif()
message("+++++++++++++++++ ${volk_gnsssdr_sources}")
#Use object library for faster overall build in newer versions of cmake #Use object library for faster overall build in newer versions of cmake
if(CMAKE_VERSION VERSION_GREATER "2.8.7") if(CMAKE_VERSION VERSION_GREATER "2.8.7")
#Create a volk_gnsssdr object library (requires cmake >= 2.8.8) #Create a volk_gnsssdr object library (requires cmake >= 2.8.8)
add_library(volk_gnsssdr_obj OBJECT ${volk_gnsssdr_sources}) add_library(volk_gnsssdr_obj OBJECT ${volk_gnsssdr_sources})
#Add dynamic library #Add dynamic library
#add_library(volk_gnsssdr SHARED $<TARGET_OBJECTS:volk_gnsssdr_obj>) add_library(volk_gnsssdr SHARED $<TARGET_OBJECTS:volk_gnsssdr_obj>)
file(GLOB orc ${CMAKE_SOURCE_DIR}/kernels/volk_gnsssdr/asm/orc/*.orc) file(GLOB orc ${CMAKE_SOURCE_DIR}/kernels/volk_gnsssdr/asm/orc/*.orc)
if(ENABLE_STATIC_LIBS) if(ENABLE_STATIC_LIBS)
add_library(volk_gnsssdr STATIC $<TARGET_OBJECTS:volk_gnsssdr_obj> ${orc} ${h_files}) add_library(volk_gnsssdr STATIC $<TARGET_OBJECTS:volk_gnsssdr_obj> ${orc} )
else(ENABLE_STATIC_LIBS) else(ENABLE_STATIC_LIBS)
add_library(volk_gnsssdr SHARED $<TARGET_OBJECTS:volk_gnsssdr_obj> ${orc} ${h_files}) add_library(volk_gnsssdr SHARED $<TARGET_OBJECTS:volk_gnsssdr_obj> ${orc})
endif(ENABLE_STATIC_LIBS) endif(ENABLE_STATIC_LIBS)
target_link_libraries(volk_gnsssdr ${volk_gnsssdr_libraries} ${Boost_LIBRARIES}) target_link_libraries(volk_gnsssdr ${volk_gnsssdr_libraries} ${Boost_LIBRARIES})
#Configure target properties #Configure target properties