Skip to content

Commit

Permalink
Optional library dependency CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoherbelin committed Mar 14, 2022
1 parent a2906c6 commit d76e518
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ endif()
if (GLM_FOUND)
macro_log_feature(GLM_FOUND "GLM" "OpenGL mathematics" "https://glm.g-truc.net" TRUE)
else ()
set(GLM_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/ext/glm)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/ext/glm)
message(STATUS "Compiling 'GLM' OpenGL mathematics https://glm.g-truc.net -- ${CMAKE_CURRENT_SOURCE_DIR}/ext/glm")
endif()
Expand All @@ -158,9 +159,9 @@ endif()
if (TINYXML2_FOUND)
macro_log_feature(TINYXML2_FOUND "TinyXML2" "TinyXML2 library" "https://github.com/leethomason/tinyxml2.git" TRUE)
else ()
add_library(tinyxml2 "${CMAKE_CURRENT_SOURCE_DIR}/ext/tinyxml2/tinyxml2.cpp")
set(TINYXML2_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/ext/tinyxml2)
set(TINYXML2_LIBRARIES -ltinyxml2)
set(TINYXML2_LIBRARIES TINYXML2)
add_library(TINYXML2 "${CMAKE_CURRENT_SOURCE_DIR}/ext/tinyxml2/tinyxml2.cpp")
message(STATUS "Compiling 'TinyXML2' from https://github.com/leethomason/tinyxml2.git -- ${TINYXML2_INCLUDE_DIRS}")
endif()

Expand Down Expand Up @@ -189,7 +190,7 @@ if (AbletonLink_FOUND)
macro_log_feature(AbletonLink_FOUND "AbletonLink" "Ableton Link synchronizer" "https://github.com/Ableton/link" TRUE)
else ()
include(${CMAKE_CURRENT_SOURCE_DIR}/ext/link/AbletonLinkConfig.cmake)
message(STATUS "Compiling with Ableton Link https://github.com/Ableton/link -- ${CMAKE_CURRENT_SOURCE_DIR}/ext/link")
message(STATUS "Compiling 'Ableton Link' from https://github.com/Ableton/link -- ${CMAKE_CURRENT_SOURCE_DIR}/ext/link")
endif()

#
Expand Down
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,27 @@ Compile (or re-compile after pull):
**Libraries:**

- gstreamer
- gst-plugins : libav, base, good, bad & ugly
- gst-plugins (libav, base, good, bad & ugly)
- libglfw3
- libicu
- libicu (icu-i18n icu-uc icu-io)

Optionnal:

- glm
- stb
- TinyXML2
- AbletonLink

#### Install Dependencies

**Ubuntu**

$ apt-get install build-essential cmake libpng-dev libglfw3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-libav libicu-dev libgtk-3-dev

Optionnal:

$ apt-get install libglm-dev libstb-dev libtinyxml2-dev ableton-link-dev

**OSX with Brew**

$ brew install cmake libpng glfw gstreamer gst-libav gst-plugins-bad gst-plugins-base gst-plugins-good gst-plugins-ugly icu4c
Expand Down

0 comments on commit d76e518

Please sign in to comment.