Skip to content

Commit

Permalink
Use system's spdlog based on cmake option
Browse files Browse the repository at this point in the history
  • Loading branch information
llloret committed Jun 4, 2020
1 parent a1205b4 commit 99a9d77
Show file tree
Hide file tree
Showing 108 changed files with 14,067 additions and 11,396 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ before_install:
- iflin sudo apt-get update
- iflin sudo apt-get install --yes libboost-system-dev libboost-program-options-dev
- iflin sudo apt-get install --yes libasound2-dev
- iflin sudo apt-get install --yes spdlog
- iflin sudo apt-get install --yes build-essential gcc-4.9 g++-4.9 cmake pkg-config
- iflin sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
- iflin sudo update-alternatives --auto gcc
Expand Down
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,22 @@ if(NOT MSVC)
endif(APPLE)
endif(NOT MSVC)

if(APPLE)
set(USE_SYSTEM_SPDLOG OFF CACHE BOOL "Use the system's spdlog instead of the bundled one")

if(APPLE)
elseif(UNIX)
find_package(ALSA REQUIRED)
endif(APPLE)

if (USE_SYSTEM_SPDLOG)
find_package(spdlog REQUIRED)

This comment has been minimized.

Copy link
@dvzrv

dvzrv Aug 11, 2020

Here I had to add add_definitions(-D SPDLOG_FMT_EXTERNAL) because on distributions spdlog is usually built against fmt and should make use of that.

else(USE_SYSTEM_SPDLOG)
include_directories(${PROJECT_SOURCE_DIR}/external_libs/spdlog-0.16.3/include)
endif(USE_SYSTEM_SPDLOG)

set(oscpack_path ${PROJECT_SOURCE_DIR}/external_libs/oscpack_1_1_0)
add_subdirectory(${oscpack_path})
include_directories(${oscpack_path} ${PROJECT_SOURCE_DIR}/external_libs/spdlog-0.11.0/include JuceLibraryCode JuceLibraryCode/modules ${PROJECT_SOURCE_DIR}/external_libs/cxxopts)
include_directories(${oscpack_path} JuceLibraryCode JuceLibraryCode/modules ${PROJECT_SOURCE_DIR}/external_libs/cxxopts)

set(m2o_sources
src/m2o.cpp
Expand Down
80 changes: 0 additions & 80 deletions external_libs/spdlog-0.11.0/CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion external_libs/spdlog-0.11.0/example/jni/example.cpp

This file was deleted.

116 changes: 0 additions & 116 deletions external_libs/spdlog-0.11.0/include/spdlog/sinks/ansicolor_sink.h

This file was deleted.

151 changes: 0 additions & 151 deletions external_libs/spdlog-0.11.0/tests/file_log.cpp

This file was deleted.

Loading

0 comments on commit 99a9d77

Please sign in to comment.