Skip to content

Commit

Permalink
Merge pull request #5 from christofmuc/fixLinux
Browse files Browse the repository at this point in the history
Fix Linux build
  • Loading branch information
christofmuc committed May 24, 2020
2 parents 26d017d + b6a9044 commit f831268
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 27 deletions.
32 changes: 30 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ IF (WIN32)
URL https://www.python.org/ftp/python/3.6.8/python-3.6.8-embed-amd64.zip
)
FetchContent_MakeAvailable(pythonembedded)
ELSEIF(UNIX)
# Include useful scripts for CMake
find_package(PkgConfig REQUIRED)
find_package(OpenGL)

# These calls create special `PkgConfig::<MODULE>` variables
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
pkg_check_modules(GLEW REQUIRED IMPORTED_TARGET glew)
pkg_check_modules(WEBKIT REQUIRED IMPORTED_TARGET webkit2gtk-4.0)
find_package(ICU REQUIRED data uc)
ENDIF()

# We need a little bit support for the JUCE library, and also want to put our own CMake helpers on the module path
Expand All @@ -51,9 +61,9 @@ IF(WIN32)
IF(DEFINED ENV{APPVEYOR})
# Fixed path in Appveyor Windows build machine
set(PYTHON_EXECUTABLE "C:/Python36-x64/python.exe")
ELSE()
ELSE()
IF(NOT DEFINED PYTHON_EXECUTABLE)
set(PYTHON_EXECUTABLE " c:/python/python36/python.exe")
set(PYTHON_EXECUTABLE "c:/python/python36/python.exe")
ENDIF()
message("USING PYTHON ${PYTHON_EXECUTABLE} at ${PYTHON_VERSION_MAJOR} and ${PYTHON_VERSION_MINOR}")
ENDIF()
Expand All @@ -63,6 +73,24 @@ ENDIF()
set(PYBIND11_PYTHON_VERSION 3.6)
add_subdirectory("third_party/pybind11")

# Define the list of link libraries required on Linux linking with JUCE, this must be used by any executable / module to run standalone
IF(UNIX)
set(LINUX_JUCE_LINK_LIBRARIES
PkgConfig::WEBKIT
PkgConfig::GTK
PkgConfig::GLEW
Xext
X11
pthread
${CMAKE_DL_LIBS}
freetype
curl
asound)

# Also, as we will be building a shared module for Python, make sure GCC generates relocatable code suited for inclusion in a shared library
add_definitions(-fPIC)
ENDIF()

# Include the SQLite wrapper for MidiKraft-database
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/third_party/SQLiteCpp)

Expand Down
25 changes: 1 addition & 24 deletions The-Orm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,6 @@ cmake_minimum_required(VERSION 3.14)

project(KnobKraftOrm VERSION 1.5.0)

IF (WIN32)
# All setup for UI software on Windows
ELSEIF(UNIX)
# Include useful scripts for CMake
find_package(PkgConfig REQUIRED)
find_package(OpenGL)

# These calls create special `PkgConfig::<MODULE>` variables
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
pkg_check_modules(GLEW REQUIRED IMPORTED_TARGET glew)
pkg_check_modules(WEBKIT REQUIRED IMPORTED_TARGET webkit2gtk-4.0)
find_package(ICU REQUIRED data uc)
ENDIF()

find_package(JUCE REQUIRED
COMPONENTS
juce_core
Expand Down Expand Up @@ -89,18 +75,9 @@ IF(WIN32)
ELSEIF(UNIX)
target_link_libraries(KnobKraftOrm PRIVATE
${JUCE_LIBRARIES}
PkgConfig::WEBKIT
PkgConfig::GTK
PkgConfig::GLEW
${LINUX_JUCE_LINK_LIBRARIES}
ICU::data ICU::uc
Xext
X11
pthread
${CMAKE_DL_LIBS}
freetype
curl
${MIDIKRAFT_LIBRARIES}
asound
SQLiteCpp
sqlite3
)
Expand Down
3 changes: 3 additions & 0 deletions The-Orm/ideas.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ BUGS
* Global settings needs to change MIDI channel internally when using the settings editor to change it
* When turning on a synth in the setup and it becomes active, the advanced filter dialog is wrong

STARTED FEATURES TO BE FINISHED AND ANNOUNCED
* Scripted Query

OB-6
+ Implement parameter set of OB-6 for patch diff

Expand Down
2 changes: 1 addition & 1 deletion pytschirp
Submodule pytschirp updated 1 files
+31 −3 CMakeLists.txt

0 comments on commit f831268

Please sign in to comment.