Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions client_server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ message("-- Found JSONCPP include dir: ${JSONCPP_INCLUDE_DIRS}")
message("-- Found JSONCPP library dir: ${JSONCPP_LIBRARY_DIRS}")
message("-- Found JSONCPP libraries : ${JSONCPP_LIBRARIES}")
include_directories("${Boost_INCLUDE_DIRS}" ${PYTHON_INCLUDE_DIR})
if(JSONCPP_INCLUDE_DIRS)
include_directories("${JSONCPP_INCLUDE_DIRS}")
endif(JSONCPP_INCLUDE_DIRS)
pkg_check_modules(UUID uuid REQUIRED)
include_directories("${UUID_INCLUDE_DIRS}")

Expand Down Expand Up @@ -71,5 +73,6 @@ set(INSTALL_LIB_DIR lib CACHE PATH "Installation directory for lib
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/cadabra-server DESTINATION bin)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/cadabra2html DESTINATION bin)
install(TARGETS cadabra_client LIBRARY DESTINATION "${INSTALL_LIB_DIR}")
install(TARGETS cadabra_server LIBRARY DESTINATION "${INSTALL_LIB_DIR}")


2 changes: 1 addition & 1 deletion client_server/Snoop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <ctime>
#include <sys/utsname.h>
#include <stdint.h>
#include <jsoncpp/json/json.h>
#include <json/json.h>
#include <set>


Expand Down
3 changes: 2 additions & 1 deletion client_server/regexp_tester.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ int main(int argc, char **argv)
try {
std::regex match(argv[1]);
std::smatch res;
if(std::regex_search(std::string(argv[2]), res, match)) {
std::string arg = argv[2];
if(std::regex_search(arg, res, match)) {
for(unsigned int i=0; i<res.size(); ++i) {
std::cout << i << ":\t |" << res[i] << "|" << std::endl;
}
Expand Down
7 changes: 4 additions & 3 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost 1.45.0 COMPONENTS python)
find_program(PYTHON "python" REQUIRED)
set(Python_ADDITIONAL_VERSIONS 2.7)
find_package(PythonInterp REQUIRED)

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)
Expand Down Expand Up @@ -156,11 +157,11 @@ set(IMAGES
#set(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in")
#set(SETUP_PY "${CMAKE_CURRENT_BINARY_DIR}/setup.py")
#configure_file(${SETUP_PY_IN} ${SETUP_PY})
#install(CODE "execute_process(COMMAND ${PYTHON} ${SETUP_PY} install)")
#install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} install)")

# import site; print site.getsitepackages()[0]

execute_process(COMMAND ${PYTHON} -c "import site; print site.getsitepackages()[0];"
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import site; print site.getsitepackages()[0];"
OUTPUT_VARIABLE python_site_path OUTPUT_STRIP_TRAILING_WHITESPACE)

message("-- Python site path at ${python_site_path}")
Expand Down
8 changes: 6 additions & 2 deletions core/PythonCdb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@

// This now works on both Linux and OS X El Capitan, but your mileage may vary.
//
#ifdef __clang__
#ifdef __linux__
#if (defined(__clang__) && defined(__linux__)) || defined(__GNUG__)
#ifdef __GNUG__
namespace boost {
#endif
template<typename T>
T *get_pointer(std::shared_ptr<T> p)
{
return p.get();
}
#ifdef __GNUG__
}
#endif
#endif

Expand Down
3 changes: 3 additions & 0 deletions frontend/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
endif()

# Create library
set(INSTALL_LIB_DIR lib CACHE PATH "Installation directory for libraries")
include_directories(".")
add_library(texengine SHARED TeXEngine.cc lodepng.cc exec-stream.cc)
target_link_libraries(texengine ${Boost_LIBRARIES} pthread)
add_executable(test_tex test_tex.cc)
target_link_libraries(test_tex texengine)
install(TARGETS texengine LIBRARY DESTINATION "${INSTALL_LIB_DIR}")

2 changes: 2 additions & 0 deletions frontend/gtkmm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ include_directories(${GTKMM3_INCLUDE_DIRS})
link_directories(${GTKMM3_LIBRARY_DIRS})
add_definitions(${GTKMM3_CFLAGS_OTHER})
pkg_check_modules(JSONCPP jsoncpp REQUIRED) # libjsoncpp-dev
if(JSONCPP_INCLUDE_DIRS)
include_directories("${JSONCPP_INCLUDE_DIRS}")
endif(JSONCPP_INCLUDE_DIRS)
link_directories(${JSONCPP_LIBRARY_DIRS})
find_package(Boost 1.45.0 COMPONENTS system)
set(Boost_USE_STATIC_LIBS OFF)
Expand Down
2 changes: 1 addition & 1 deletion frontend/gtkmm/NotebookWindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ NotebookWindow::NotebookWindow()
#ifdef __APPLE__
scale = 1.0;
#else
settings = Gio::Settings::create("org.cinnamon.desktop.interface");
settings = Gio::Settings::create("org.gnome.desktop.interface");
scale = settings->get_double("text-scaling-factor");
#endif
engine.latex_packages.push_back("breqn");
Expand Down