Commit 8618a838 by Jessica Hawkwell

fixing boehm_gc

1 parent 2ae5f937
...@@ -13,9 +13,15 @@ if (EXISTS /usr/local/include) ...@@ -13,9 +13,15 @@ if (EXISTS /usr/local/include)
include_directories(/usr/local/include) include_directories(/usr/local/include)
endif() endif()
include_directories(AFTER SYSTEM ${CMAKE_BINARY_DIR}/deps/resvg/capi/include/) find_library(BoehmGC_C NAMES gc-threaded REQUIRED)
find_library(BoehmGC_CPP NAMES gccpp-threaded REQUIRED)
set(BoehmGC ${BoehmGC_C} ${BoehmGC_CPP})
add_subdirectory(deps) find_package(X11)
#include_directories(AFTER SYSTEM ${CMAKE_BINARY_DIR}/deps/resvg/capi/include/)
#add_subdirectory(deps)
add_subdirectory(src/libnde) add_subdirectory(src/libnde)
#add_subdirectory(src/libntk) #add_subdirectory(src/libntk)
......
#!/bin/sh
CMAKEFILES=`find * -type d -name CMakeFiles`
CMAKECACHE=`find * -type f -name CMakeCache.txt`
MAKEFILES=`find * -type f -name Makefile`
INSTALL=`find * -type f -name cmake_install.cmake`
PKGLIST=`find * -type f -name install_manifest.txt`
VIMS=`find * -type f -name "*~"`
BUILDS=`find * -type d -name build`
if [ -n "${CMAKEFILES}" ]; then
echo Removing CMakeFiles
rm -r ${CMAKEFILES}
fi
if [ -n "${CMAKECACHE}" ]; then
echo Removing CMakeCache
rm ${CMAKECACHE}
fi
if [ -n "${MAKEFILES}" ]; then
echo Removing Makefiles
rm ${MAKEFILES}
fi
if [ -n "${INSTALL}" ]; then
echo Removing cmake_install.cmake
rm ${INSTALL}
fi
if [ -n "${PKGLIST}" ]; then
echo Removing install manifsts
rm ${PKGLIST}
fi
if [ -n "${VIMS}" ]; then
echo Removing vim backups
rm ${VIMS}
fi
if [ -n "${BUILDS}" ]; then
echo Removing artifacts
rm -rf ${BUILDS}
fi
if [ -d localized ]; then
echo Removing localized text
rm -rf localized
fi
...@@ -2,11 +2,9 @@ cmake_minimum_required (VERSION 3.10) ...@@ -2,11 +2,9 @@ cmake_minimum_required (VERSION 3.10)
project (NitroWin) project (NitroWin)
configure_file(${PROJECT_NAME}.h.in ${PROJECT_NAME}.h) configure_file(${PROJECT_NAME}.h.in ${PROJECT_NAME}.h)
find_package(X11)
link_libraries(${X11_LIBRARIES}) link_libraries(${X11_LIBRARIES})
add_executable(${PROJECT_NAME} NUtils.cpp NWMAction.cpp NWManager.cpp main.cpp) add_executable(${PROJECT_NAME} NUtils.cpp NWMAction.cpp NWManager.cpp main.cpp)
target_link_libraries(${PROJECT_NAME} LINK_PUBLIC nde ) target_link_libraries(${PROJECT_NAME} LINK_PUBLIC ${BoehmGC} nde)
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin) install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <iostream> #include <iostream>
class NUtils { class NUtils : public gc {
public: public:
static void frameWindow(Window w); static void frameWindow(Window w);
static void frameWindow(Window w, bool pre_exist); static void frameWindow(Window w, bool pre_exist);
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
//template <class T> class NSize; //template <class T> class NSize;
//template <typename T> class NPosition; //template <typename T> class NPosition;
class NWMAction { class NWMAction : public gc {
protected: protected:
// MOVING WINDOWS // MOVING WINDOWS
static nitrogen::NPosition<int> *drag_start_cursor; static nitrogen::NPosition<int> *drag_start_cursor;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "NitroWin.h" #include "NitroWin.h"
#include <unordered_map> #include <unordered_map>
class NWManager { class NWManager : public gc {
public: public:
NWManager(); NWManager();
virtual ~NWManager(); virtual ~NWManager();
......
...@@ -44,5 +44,13 @@ ...@@ -44,5 +44,13 @@
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/X.h> #include <X11/X.h>
#ifndef GC_NAME_CONFLICT
#define GC_NAME_CONFLICT
#include <gc/gc.h>
#include <gc/gc_cpp.h>
#include <gc/gc_allocator.h>
#include <gc/gc_backptr.h>
#endif
#endif /* NITROWIN_H */ #endif /* NITROWIN_H */
...@@ -44,5 +44,13 @@ ...@@ -44,5 +44,13 @@
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/X.h> #include <X11/X.h>
#ifndef GC_NAME_CONFLICT
#define GC_NAME_CONFLICT
#include <gc/gc.h>
#include <gc/gc_cpp.h>
#include <gc/gc_allocator.h>
#include <gc/gc_backptr.h>
#endif
#endif /* NITROWIN_H */ #endif /* NITROWIN_H */
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include <iostream> #include <iostream>
int main(int argc, char** argv) { int main(int argc, char** argv) {
GC_INIT();
std::cout << NITROWIN_NAME << " v" << NITROWIN_VERSION << std::endl; std::cout << NITROWIN_NAME << " v" << NITROWIN_VERSION << std::endl;
NWManager *nwm = new NWManager(); NWManager *nwm = new NWManager();
nwm->run(); nwm->run();
......
...@@ -2,10 +2,6 @@ cmake_minimum_required (VERSION 3.10) ...@@ -2,10 +2,6 @@ cmake_minimum_required (VERSION 3.10)
project (nde) project (nde)
configure_file(${PROJECT_NAME}.h.in ${PROJECT_NAME}.h) configure_file(${PROJECT_NAME}.h.in ${PROJECT_NAME}.h)
#include_directories("/usr/local/include")
find_library(BoehmGC gc-threaded REQUIRED)
add_library(${PROJECT_NAME} SHARED ndeMain.cpp add_library(${PROJECT_NAME} SHARED ndeMain.cpp
nitrogen/NPosition.cpp nitrogen/NPosition.cpp
nitrogen/NSize.cpp) nitrogen/NSize.cpp)
......
...@@ -45,3 +45,4 @@ target_include_directories (ntk PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) ...@@ -45,3 +45,4 @@ target_include_directories (ntk PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
install(FILES ${PROJECT_NAME}.h DESTINATION include) install(FILES ${PROJECT_NAME}.h DESTINATION include)
install(DIRECTORY nitrogen DESTINATION include FILES_MATCHING PATTERN "*.h") install(DIRECTORY nitrogen DESTINATION include FILES_MATCHING PATTERN "*.h")
install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib) install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!