mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-05 08:51:18 -05:00
Merge pull request #44 from cjcliffe/visual-studio-updates
Updates to support Visual Studio 2013
This commit is contained in:
commit
f87ee8dc6f
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
cmake_build/
|
||||||
|
cmake_build_msvc/
|
||||||
|
dist/
|
117
CMakeLists.txt
117
CMakeLists.txt
@ -39,14 +39,19 @@ endmacro(configure_files_recurse)
|
|||||||
|
|
||||||
project (CubicSDR)
|
project (CubicSDR)
|
||||||
|
|
||||||
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
|
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
||||||
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BINARY_DIR})
|
MESSAGE( "64 bit compiler detected" )
|
||||||
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BINARY_DIR})
|
SET( EX_PLATFORM 64 )
|
||||||
|
SET( EX_PLATFORM_NAME "x64" )
|
||||||
|
else( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
||||||
|
MESSAGE( "32 bit compiler detected" )
|
||||||
|
SET( EX_PLATFORM 32 )
|
||||||
|
SET( EX_PLATFORM_NAME "x86" )
|
||||||
|
endif( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
||||||
|
|
||||||
#add_subdirectory(${PROJECT_SOURCE_DIR}/glfw-3.0.3 ${PROJECT_BINARY_DIR}/glfw/)
|
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${EX_PLATFORM_NAME})
|
||||||
#include_directories(${PROJECT_SOURCE_DIR}/glfw-3.0.3/include)
|
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_BINARY_DIR}/${EX_PLATFORM_NAME})
|
||||||
#include_directories ( ${PROJECT_SOURCE_DIR}/../CubicVR-2/build/include )
|
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_BINARY_DIR}/${EX_PLATFORM_NAME})
|
||||||
#link_directories ( ${PROJECT_SOURCE_DIR}/../CubicVR-2/build/lib )
|
|
||||||
|
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
|
|
||||||
@ -54,36 +59,67 @@ find_package(wxWidgets REQUIRED gl core base)
|
|||||||
set(wxWidgets_CONFIGURATION mswu)
|
set(wxWidgets_CONFIGURATION mswu)
|
||||||
include(${wxWidgets_USE_FILE})
|
include(${wxWidgets_USE_FILE})
|
||||||
|
|
||||||
# include_directories ( ${PROJECT_SOURCE_DIR}/../CubicVR-2/build/include )
|
|
||||||
# link_directories ( ${PROJECT_SOURCE_DIR}/../CubicVR-2/build/lib ${OPENGL_INCLUDE_DIR})
|
|
||||||
|
|
||||||
IF (WIN32)
|
IF (WIN32)
|
||||||
set(wxWidgets_USE_STATIC ON)
|
set(wxWidgets_USE_STATIC ON)
|
||||||
include_directories ( ${PROJECT_SOURCE_DIR}/external/fftw-3.3.4-dll64 ${PROJECT_SOURCE_DIR}/external/rtl-sdr-release )
|
|
||||||
link_directories ( ${PROJECT_SOURCE_DIR}/external/fftw-3.3.4-dll64 ${PROJECT_SOURCE_DIR}/external/rtl-sdr-release/x64 )
|
|
||||||
set(FFTW_LIB fftw3f-3)
|
|
||||||
|
|
||||||
link_directories ( ${PROJECT_SOURCE_DIR}/external/liquid-dsp/lib/64 )
|
# Audio device selection is not mandatory, dummy audio device is used if none are compiled in.
|
||||||
|
# Can also compile support for more than one simultaneously.
|
||||||
|
set(USE_AUDIO_DS OFF CACHE BOOL "Include support for DirectSound")
|
||||||
|
set(USE_AUDIO_WASAPI ON CACHE BOOL "Include support for WASAPI Audio")
|
||||||
|
# TODO:
|
||||||
|
# set(USE_AUDIO_ASIO OFF CACHE BOOL "Include support for ASIO Audio")
|
||||||
|
|
||||||
|
# WASAPI
|
||||||
|
IF(USE_AUDIO_WASAPI)
|
||||||
|
ADD_DEFINITIONS(-D__WINDOWS_WASAPI__)
|
||||||
|
IF (NOT MSVC)
|
||||||
|
SET(OTHER_LIBRARIES ${OTHER_LIBRARIES} -luuid -lksuser)
|
||||||
|
ENDIF(NOT MSVC)
|
||||||
|
ENDIF(USE_AUDIO_WASAPI)
|
||||||
|
|
||||||
|
# DirectSound
|
||||||
|
IF (USE_AUDIO_DS)
|
||||||
|
ADD_DEFINITIONS(-D__WINDOWS_DS__)
|
||||||
|
IF (MSVC)
|
||||||
|
SET(OTHER_LIBRARIES ${OTHER_LIBRARIES} dsound.lib)
|
||||||
|
ELSE (MSVC)
|
||||||
|
SET(OTHER_LIBRARIES ${OTHER_LIBRARIES} -ldsound)
|
||||||
|
ENDIF (MSVC)
|
||||||
|
ENDIF(USE_AUDIO_DS)
|
||||||
|
|
||||||
|
# ASIO?
|
||||||
|
#IF(USE_AUDIO_ASIO)
|
||||||
|
#ENDIF(USE_AUDIO_ASIO)
|
||||||
|
|
||||||
|
# FFTW
|
||||||
|
include_directories ( ${PROJECT_SOURCE_DIR}/external/fftw-3.3.4 ${PROJECT_SOURCE_DIR}/external/rtl-sdr-release )
|
||||||
|
set(FFTW_LIB libfftw3f-3)
|
||||||
|
link_directories ( ${PROJECT_SOURCE_DIR}/external/fftw-3.3.4/${EX_PLATFORM} )
|
||||||
|
configure_files(${PROJECT_SOURCE_DIR}/external/fftw-3.3.4/${EX_PLATFORM} ${CMAKE_BINARY_DIR}/${EX_PLATFORM_NAME} "*.dll")
|
||||||
|
|
||||||
include_directories ( ${PROJECT_SOURCE_DIR}/external/liquid-dsp/include )
|
include_directories ( ${PROJECT_SOURCE_DIR}/external/liquid-dsp/include )
|
||||||
|
set(LIQUID_LIB libliquid)
|
||||||
|
|
||||||
ADD_DEFINITIONS(
|
# Haven't looked into why these are different, just explicitly including everything for now until it can be sorted neatly.
|
||||||
# To use wasapi
|
IF (MSVC)
|
||||||
-D__WINDOWS_WASAPI__
|
# LIQUID
|
||||||
|
link_directories ( ${PROJECT_SOURCE_DIR}/external/liquid-dsp/msvc/${EX_PLATFORM} )
|
||||||
# To use directsound
|
configure_files(${PROJECT_SOURCE_DIR}/external/liquid-dsp/msvc/${EX_PLATFORM} ${CMAKE_BINARY_DIR}/${EX_PLATFORM_NAME}/ "*.dll")
|
||||||
#-D__WINDOWS_DS__
|
# RTL-SDR
|
||||||
)
|
link_directories ( ${PROJECT_SOURCE_DIR}/external/rtl-sdr-release/msvc/${EX_PLATFORM} )
|
||||||
|
configure_files(${PROJECT_SOURCE_DIR}/external/rtl-sdr-release/msvc/${EX_PLATFORM} ${CMAKE_BINARY_DIR}/${EX_PLATFORM_NAME} "*.dll")
|
||||||
# To use wasapi
|
ELSE (MSVC) # GCC
|
||||||
SET(OTHER_LIBRARIES -luuid -lksuser )
|
# LIQUID
|
||||||
|
link_directories ( ${PROJECT_SOURCE_DIR}/external/liquid-dsp/gcc/${EX_PLATFORM} )
|
||||||
# To use DirectSound (which uses WASAPI anyways?)
|
configure_files(${PROJECT_SOURCE_DIR}/external/liquid-dsp/gcc/${EX_PLATFORM} ${CMAKE_BINARY_DIR}/${EX_PLATFORM_NAME} "*.dll")
|
||||||
# SET(OTHER_LIBRARIES -ldsound)
|
# RTL-SDR
|
||||||
|
link_directories ( ${PROJECT_SOURCE_DIR}/external/rtl-sdr-release/gcc/${EX_PLATFORM} )
|
||||||
|
configure_files(${PROJECT_SOURCE_DIR}/external/rtl-sdr-release/gcc/${EX_PLATFORM} ${CMAKE_BINARY_DIR}/${EX_PLATFORM_NAME} "*.dll")
|
||||||
|
ENDIF(MSVC)
|
||||||
|
|
||||||
# Copy DLL files to build dir
|
# Copy DLL files to build dir
|
||||||
configure_files(${PROJECT_SOURCE_DIR}/external/liquid-dsp-lib/64 ${CMAKE_BINARY_DIR} "*.dll")
|
configure_files(${PROJECT_SOURCE_DIR}/external/fftw-3.3.4/${EX_PLATFORM_NAME} ${CMAKE_BINARY_DIR}/${EX_PLATFORM_NAME} "*.dll")
|
||||||
configure_files(${PROJECT_SOURCE_DIR}/external/rtl-sdr-release/x64 ${CMAKE_BINARY_DIR} "*.dll")
|
|
||||||
configure_files(${PROJECT_SOURCE_DIR}/external/fftw-3.3.4-dll64 ${CMAKE_BINARY_DIR} "*.dll")
|
|
||||||
|
|
||||||
ENDIF (WIN32)
|
ENDIF (WIN32)
|
||||||
|
|
||||||
@ -98,6 +134,7 @@ IF (UNIX AND NOT APPLE)
|
|||||||
link_directories(${RTLSDR_LIB})
|
link_directories(${RTLSDR_LIB})
|
||||||
|
|
||||||
set(FFTW_LIB fftw3f)
|
set(FFTW_LIB fftw3f)
|
||||||
|
set(OTHER_LIBRARIES liquid)
|
||||||
|
|
||||||
IF(USE_AUDIO_PULSE)
|
IF(USE_AUDIO_PULSE)
|
||||||
SET (OTHER_LIBRARIES ${OTHER_LIBRARIES} pulse-simple pulse)
|
SET (OTHER_LIBRARIES ${OTHER_LIBRARIES} pulse-simple pulse)
|
||||||
@ -145,7 +182,7 @@ IF (APPLE)
|
|||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(COREAUDIO_LIBRARY CoreAudio)
|
FIND_LIBRARY(COREAUDIO_LIBRARY CoreAudio)
|
||||||
SET (OTHER_LIBRARIES ${COREAUDIO_LIBRARY})
|
SET (OTHER_LIBRARIES ${COREAUDIO_LIBRARY} liquid)
|
||||||
ENDIF (APPLE)
|
ENDIF (APPLE)
|
||||||
|
|
||||||
|
|
||||||
@ -239,17 +276,29 @@ include_directories (
|
|||||||
${PROJECT_SOURCE_DIR}/external/lodepng
|
${PROJECT_SOURCE_DIR}/external/lodepng
|
||||||
${PROJECT_SOURCE_DIR}/external/tinyxml
|
${PROJECT_SOURCE_DIR}/external/tinyxml
|
||||||
)
|
)
|
||||||
|
IF (NOT MSVC)
|
||||||
ADD_DEFINITIONS(
|
ADD_DEFINITIONS(
|
||||||
-std=c++0x # or -std=c++11
|
-std=c++0x # or -std=c++11
|
||||||
-pthread
|
-pthread
|
||||||
)
|
)
|
||||||
|
ENDIF(NOT MSVC)
|
||||||
|
|
||||||
configure_files(${PROJECT_SOURCE_DIR}/font ${CMAKE_BINARY_DIR} "*.fnt")
|
configure_files(${PROJECT_SOURCE_DIR}/font ${CMAKE_BINARY_DIR}/${EX_PLATFORM_NAME} "*.fnt")
|
||||||
configure_files(${PROJECT_SOURCE_DIR}/font ${CMAKE_BINARY_DIR} "*.png")
|
configure_files(${PROJECT_SOURCE_DIR}/font ${CMAKE_BINARY_DIR}/${EX_PLATFORM_NAME} "*.png")
|
||||||
|
|
||||||
add_executable(CubicSDR ${cubicsdr_sources} ${cubicsdr_headers})
|
add_executable(CubicSDR ${cubicsdr_sources} ${cubicsdr_headers})
|
||||||
|
|
||||||
target_link_libraries(CubicSDR rtlsdr liquid ${FFTW_LIB} ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${OTHER_LIBRARIES})
|
target_link_libraries(CubicSDR rtlsdr ${LIQUID_LIB} ${FFTW_LIB} ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${OTHER_LIBRARIES})
|
||||||
|
|
||||||
|
IF (MSVC)
|
||||||
|
set_target_properties(CubicSDR PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:WINDOWS")
|
||||||
|
set_target_properties(CubicSDR PROPERTIES COMPILE_DEFINITIONS_DEBUG "_WINDOWS")
|
||||||
|
set_target_properties(CubicSDR PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:WINDOWS")
|
||||||
|
set_target_properties(CubicSDR PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_WINDOWS")
|
||||||
|
set_target_properties(CubicSDR PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")
|
||||||
|
set_target_properties(CubicSDR PROPERTIES COMPILE_DEFINITIONS_RELEASE "_WINDOWS")
|
||||||
|
set_target_properties(CubicSDR PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS")
|
||||||
|
set_target_properties(CubicSDR PROPERTIES COMPILE_DEFINITIONS_MINSIZEREL "_WINDOWS")
|
||||||
|
set(CMAKE_CREATE_WIN32_EXE "/SUBSYSTEM:WINDOWS /ENTRY:\"mainCRTStartup\"")
|
||||||
|
ENDIF(MSVC)
|
||||||
|
|
||||||
|
3
cmake_build/.gitignore
vendored
3
cmake_build/.gitignore
vendored
@ -1,3 +0,0 @@
|
|||||||
[^.]*
|
|
||||||
.project
|
|
||||||
.cproject
|
|
BIN
external/fftw-3.3.4/32/libfftw3f-3.dll
vendored
Normal file
BIN
external/fftw-3.3.4/32/libfftw3f-3.dll
vendored
Normal file
Binary file not shown.
BIN
external/fftw-3.3.4/32/libfftw3f-3.exp
vendored
Normal file
BIN
external/fftw-3.3.4/32/libfftw3f-3.exp
vendored
Normal file
Binary file not shown.
BIN
external/fftw-3.3.4/32/libfftw3f-3.lib
vendored
Normal file
BIN
external/fftw-3.3.4/32/libfftw3f-3.lib
vendored
Normal file
Binary file not shown.
BIN
external/fftw-3.3.4/64/libfftw3f-3.exp
vendored
Normal file
BIN
external/fftw-3.3.4/64/libfftw3f-3.exp
vendored
Normal file
Binary file not shown.
BIN
external/fftw-3.3.4/64/libfftw3f-3.lib
vendored
Normal file
BIN
external/fftw-3.3.4/64/libfftw3f-3.lib
vendored
Normal file
Binary file not shown.
BIN
external/liquid-dsp/lib/64/4.7/libliquid.a
vendored
BIN
external/liquid-dsp/lib/64/4.7/libliquid.a
vendored
Binary file not shown.
BIN
external/liquid-dsp/lib/64/4.7/libliquid.dll
vendored
BIN
external/liquid-dsp/lib/64/4.7/libliquid.dll
vendored
Binary file not shown.
BIN
external/liquid-dsp/msvc/32/libliquid.a
vendored
Normal file
BIN
external/liquid-dsp/msvc/32/libliquid.a
vendored
Normal file
Binary file not shown.
BIN
external/liquid-dsp/msvc/32/libliquid.dll
vendored
Normal file
BIN
external/liquid-dsp/msvc/32/libliquid.dll
vendored
Normal file
Binary file not shown.
BIN
external/liquid-dsp/msvc/32/libliquid.exp
vendored
Normal file
BIN
external/liquid-dsp/msvc/32/libliquid.exp
vendored
Normal file
Binary file not shown.
BIN
external/liquid-dsp/msvc/32/libliquid.lib
vendored
Normal file
BIN
external/liquid-dsp/msvc/32/libliquid.lib
vendored
Normal file
Binary file not shown.
BIN
external/liquid-dsp/msvc/64/libliquid.a
vendored
Normal file
BIN
external/liquid-dsp/msvc/64/libliquid.a
vendored
Normal file
Binary file not shown.
1871
external/liquid-dsp/msvc/64/libliquid.def
vendored
Normal file
1871
external/liquid-dsp/msvc/64/libliquid.def
vendored
Normal file
File diff suppressed because it is too large
Load Diff
BIN
external/liquid-dsp/msvc/64/libliquid.dll
vendored
Normal file
BIN
external/liquid-dsp/msvc/64/libliquid.dll
vendored
Normal file
Binary file not shown.
BIN
external/liquid-dsp/msvc/64/libliquid.exp
vendored
Normal file
BIN
external/liquid-dsp/msvc/64/libliquid.exp
vendored
Normal file
Binary file not shown.
BIN
external/liquid-dsp/msvc/64/libliquid.lib
vendored
Normal file
BIN
external/liquid-dsp/msvc/64/libliquid.lib
vendored
Normal file
Binary file not shown.
BIN
external/rtl-sdr-release/msvc/32/libusb-1.0.dll
vendored
Normal file
BIN
external/rtl-sdr-release/msvc/32/libusb-1.0.dll
vendored
Normal file
Binary file not shown.
BIN
external/rtl-sdr-release/msvc/32/rtlsdr.dll
vendored
Normal file
BIN
external/rtl-sdr-release/msvc/32/rtlsdr.dll
vendored
Normal file
Binary file not shown.
BIN
external/rtl-sdr-release/msvc/32/rtlsdr.exp
vendored
Normal file
BIN
external/rtl-sdr-release/msvc/32/rtlsdr.exp
vendored
Normal file
Binary file not shown.
BIN
external/rtl-sdr-release/msvc/32/rtlsdr.lib
vendored
Normal file
BIN
external/rtl-sdr-release/msvc/32/rtlsdr.lib
vendored
Normal file
Binary file not shown.
BIN
external/rtl-sdr-release/msvc/32/rtlsdr_static.lib
vendored
Normal file
BIN
external/rtl-sdr-release/msvc/32/rtlsdr_static.lib
vendored
Normal file
Binary file not shown.
BIN
external/rtl-sdr-release/msvc/64/libusb-1.0.dll
vendored
Normal file
BIN
external/rtl-sdr-release/msvc/64/libusb-1.0.dll
vendored
Normal file
Binary file not shown.
BIN
external/rtl-sdr-release/msvc/64/rtlsdr.dll
vendored
Normal file
BIN
external/rtl-sdr-release/msvc/64/rtlsdr.dll
vendored
Normal file
Binary file not shown.
BIN
external/rtl-sdr-release/msvc/64/rtlsdr.exp
vendored
Normal file
BIN
external/rtl-sdr-release/msvc/64/rtlsdr.exp
vendored
Normal file
Binary file not shown.
BIN
external/rtl-sdr-release/msvc/64/rtlsdr.lib
vendored
Normal file
BIN
external/rtl-sdr-release/msvc/64/rtlsdr.lib
vendored
Normal file
Binary file not shown.
BIN
external/rtl-sdr-release/msvc/64/rtlsdr_static.lib
vendored
Normal file
BIN
external/rtl-sdr-release/msvc/64/rtlsdr_static.lib
vendored
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user