mirror of
				https://github.com/AlexandreRouma/SDRPlusPlus.git
				synced 2025-11-04 10:49:11 +01:00 
			
		
		
		
	Fix OSX build
This commit is contained in:
		@@ -22,8 +22,14 @@ target_link_libraries(sdrpp PRIVATE sdrpp_core)
 | 
			
		||||
# Copy dynamic libs over
 | 
			
		||||
if (MSVC)
 | 
			
		||||
    add_custom_target(do_always ALL xcopy /s \"$<TARGET_FILE_DIR:sdrpp_core>\\*.dll\" \"$<TARGET_FILE_DIR:sdrpp>\" /Y)
 | 
			
		||||
else()
 | 
			
		||||
    add_custom_target(do_always ALL cp \"$<TARGET_FILE_DIR:sdrpp_core>/sdrpp_core.so\" \"$<TARGET_FILE_DIR:sdrpp>\")
 | 
			
		||||
endif (MSVC)
 | 
			
		||||
 | 
			
		||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
 | 
			
		||||
    add_custom_target(do_always ALL cp \"$<TARGET_FILE_DIR:sdrpp_core>/sdrpp_core.so\" \"$<TARGET_FILE_DIR:sdrpp>\")
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
 | 
			
		||||
    add_custom_target(do_always ALL cp \"$<TARGET_FILE_DIR:sdrpp_core>/sdrpp_core.dylib\" \"$<TARGET_FILE_DIR:sdrpp>\")
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
# cmake .. "-DCMAKE_TOOLCHAIN_FILE=C:/Users/Alex/vcpkg/scripts/buildsystems/vcpkg.cmake" -G "Visual Studio 15 2017 Win64"
 | 
			
		||||
 
 | 
			
		||||
@@ -60,7 +60,9 @@ if (MSVC)
 | 
			
		||||
    find_package(portaudio CONFIG REQUIRED)
 | 
			
		||||
    target_link_libraries(sdrpp_core PUBLIC portaudio portaudio_static)
 | 
			
		||||
 | 
			
		||||
else()
 | 
			
		||||
endif (MSVC)
 | 
			
		||||
 | 
			
		||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
 | 
			
		||||
    target_include_directories(sdrpp_core PUBLIC "/usr/include/volk")
 | 
			
		||||
 | 
			
		||||
    target_link_libraries(sdrpp_core PUBLIC pthread)
 | 
			
		||||
@@ -73,7 +75,39 @@ else()
 | 
			
		||||
    target_link_libraries(sdrpp_core PUBLIC X11)
 | 
			
		||||
    target_link_libraries(sdrpp_core PUBLIC Xxf86vm)
 | 
			
		||||
    target_link_libraries(sdrpp_core PUBLIC dl)
 | 
			
		||||
endif (MSVC)
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
 | 
			
		||||
    find_package(OpenGL REQUIRED)
 | 
			
		||||
 | 
			
		||||
    # find_package(GLEW REQUIRED)
 | 
			
		||||
    # find_package(fftw3 REQUIRED)
 | 
			
		||||
    # find_package(glfw3 REQUIRED)
 | 
			
		||||
    # find_package(volk REQUIRED)
 | 
			
		||||
 | 
			
		||||
    target_include_directories(sdrpp_core PUBLIC /usr/local/opt/glew/include)
 | 
			
		||||
    target_include_directories(sdrpp_core PUBLIC /usr/local/opt/glfw/include)
 | 
			
		||||
    target_include_directories(sdrpp_core PUBLIC /usr/local/opt/fftw/include)
 | 
			
		||||
    target_include_directories(sdrpp_core PUBLIC /usr/local/opt/portaudio/include)
 | 
			
		||||
    target_include_directories(sdrpp_core PUBLIC /usr/local/opt/volk/include)
 | 
			
		||||
    target_include_directories(sdrpp_core PUBLIC /usr/local/opt/volk/include/volk)
 | 
			
		||||
 | 
			
		||||
    target_link_directories(sdrpp_core PUBLIC /usr/local/opt/glew/lib)
 | 
			
		||||
    target_link_directories(sdrpp_core PUBLIC /usr/local/opt/volk/lib)
 | 
			
		||||
    target_link_directories(sdrpp_core PUBLIC /usr/local/opt/glfw/lib)
 | 
			
		||||
    target_link_directories(sdrpp_core PUBLIC /usr/local/opt/fftw/lib)
 | 
			
		||||
    target_link_directories(sdrpp_core PUBLIC /usr/local/opt/portaudio/lib)
 | 
			
		||||
 | 
			
		||||
    target_link_libraries(sdrpp_core PUBLIC ${OPENGL_LIBRARIES})
 | 
			
		||||
    target_link_libraries(sdrpp_core PUBLIC volk)
 | 
			
		||||
    target_link_libraries(sdrpp_core PUBLIC glew)
 | 
			
		||||
    target_link_libraries(sdrpp_core PUBLIC glfw)
 | 
			
		||||
    target_link_libraries(sdrpp_core PUBLIC fftw3)
 | 
			
		||||
    target_link_libraries(sdrpp_core PUBLIC fftw3f)
 | 
			
		||||
    target_link_libraries(sdrpp_core PUBLIC portaudio)
 | 
			
		||||
 | 
			
		||||
endif ()
 | 
			
		||||
 | 
			
		||||
target_link_libraries(sdrpp_core PUBLIC volk)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -104,8 +104,6 @@ namespace ImGui {
 | 
			
		||||
        viewBandwidth = 1.0;
 | 
			
		||||
        wholeBandwidth = 1.0;
 | 
			
		||||
 | 
			
		||||
        glGenTextures(1, &textureId);
 | 
			
		||||
 | 
			
		||||
        updatePallette(COLOR_MAP, 13);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -363,6 +361,7 @@ namespace ImGui {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void WaterFall::updateWaterfallTexture() {
 | 
			
		||||
        glGenTextures(1, &textureId);
 | 
			
		||||
        glBindTexture(GL_TEXTURE_2D, textureId);
 | 
			
		||||
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 | 
			
		||||
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										16
									
								
								readme.md
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								readme.md
									
									
									
									
									
								
							@@ -62,7 +62,21 @@ If you followed the steps above, it should be `build/Release`.
 | 
			
		||||
comming soon :)
 | 
			
		||||
 | 
			
		||||
# Building on OSX
 | 
			
		||||
comming soon as well :)
 | 
			
		||||
## Install requirements
 | 
			
		||||
```
 | 
			
		||||
brew tap pothosware/homebrew-pothos
 | 
			
		||||
brew install volk glew glfw fftw portaudio
 | 
			
		||||
brew install soapysdr
 | 
			
		||||
```
 | 
			
		||||
You can install additional soapy device support based on your hardware.
 | 
			
		||||
 | 
			
		||||
## The build
 | 
			
		||||
```
 | 
			
		||||
mkdir build
 | 
			
		||||
cd build
 | 
			
		||||
cmake ..
 | 
			
		||||
cmake --build . --config Release
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
# Contributing
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -19,4 +19,9 @@ add_library(soapy SHARED ${SRC})
 | 
			
		||||
target_link_libraries(soapy PRIVATE sdrpp_core)
 | 
			
		||||
set_target_properties(soapy PROPERTIES PREFIX "")
 | 
			
		||||
 | 
			
		||||
target_link_libraries(soapy PUBLIC SoapySDR)
 | 
			
		||||
target_link_libraries(soapy PUBLIC SoapySDR)
 | 
			
		||||
 | 
			
		||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
 | 
			
		||||
    target_include_directories(soapy PUBLIC /usr/local/opt/soapysdr/include)
 | 
			
		||||
    target_link_directories(soapy PUBLIC /usr/local/opt/soapysdr/lib)
 | 
			
		||||
endif ()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user