aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaz Canabrava <tcanabrava@kde.org>2016-10-10 09:34:44 (GMT)
committerTomaz Canabrava <tcanabrava@kde.org>2016-11-06 10:03:51 (GMT)
commit3ef0e7ba639622d4f9e613043bb99adde5c19d05 (patch)
tree120d42bea9bafee9fd6c864c0513ad680835770f
parent6205ab584e72e295ff6162424750e521c960c5bf (diff)
Julia compilation fixes
Summary: While compilling master, a few failures regarding julia where raised on my computer: Scanning dependencies of target cantor_juliaserver [ 16%] Building CXX object src/backends/julia/juliaserver/CMakeFiles/cantor_juliaserver.dir/juliaserver.cpp.o In file included from /home/tcanabrava/Projects/kdesrc/cantor/src/backends/julia/juliaserver/juliaserver.cpp:22:0: /usr/include/julia/julia.h:59:27: fatal error: julia_threads.h: No such file or directory #include <julia_threads.h> ^ compilation terminated. Inspecting the FindJulia that's shipped with Cantor, the issue seemed obvious to me: it doesn't tries to find LibJulia, nor it does add the julia includes to the include_directories. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Differential Revision: https://phabricator.kde.org/D3070
-rw-r--r--cmake/FindJulia.cmake1
-rw-r--r--src/backends/julia/CMakeLists.txt4
-rw-r--r--src/backends/julia/juliaserver/CMakeLists.txt5
3 files changed, 7 insertions, 3 deletions
diff --git a/cmake/FindJulia.cmake b/cmake/FindJulia.cmake
index 29abf00..c1865ed 100644
--- a/cmake/FindJulia.cmake
+++ b/cmake/FindJulia.cmake
@@ -46,6 +46,7 @@ endif()
# Checking existance of main header. Some distos provide packages without actual includes
find_path(Julia_MAIN_HEADER julia.h HINTS ${Julia_INCLUDE_DIRS})
+find_library(Julia_LIBRARY julia HINTS ${Julia_INCLUDE_DIRS}/../../lib)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Julia
diff --git a/src/backends/julia/CMakeLists.txt b/src/backends/julia/CMakeLists.txt
index 2403d74..0d28afb 100644
--- a/src/backends/julia/CMakeLists.txt
+++ b/src/backends/julia/CMakeLists.txt
@@ -1,3 +1,5 @@
+include_directories(${Julia_INCLUDE_DIRS})
+
add_subdirectory(juliaserver)
add_subdirectory(tests)
@@ -16,7 +18,7 @@ ki18n_wrap_ui(JuliaBackend_SRCS settings.ui)
add_backend(juliabackend ${JuliaBackend_SRCS})
-target_link_libraries(cantor_juliabackend Qt5::DBus)
+target_link_libraries(cantor_juliabackend Qt5::DBus ${Julia_LIBRARY})
install(FILES juliabackend.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
install(FILES keywords.xml DESTINATION ${KDE_INSTALL_DATADIR}/cantor/juliabackend)
diff --git a/src/backends/julia/juliaserver/CMakeLists.txt b/src/backends/julia/juliaserver/CMakeLists.txt
index e412432..767e50a 100644
--- a/src/backends/julia/juliaserver/CMakeLists.txt
+++ b/src/backends/julia/juliaserver/CMakeLists.txt
@@ -1,12 +1,13 @@
+add_definitions(-DJULIA_ENABLE_THREADING=1)
+
set(JuliaServer_SRCS
juliaserver.cpp
main.cpp
)
-
add_executable(cantor_juliaserver ${JuliaServer_SRCS})
target_link_libraries(cantor_juliaserver
- ${JULIA_LIBRARY}
+ ${Julia_LIBRARY}
Qt5::Widgets
Qt5::DBus
)