mirror of https://github.com/KLayout/klayout.git
Fix build on FreeBSD (#656)
* Fix build on FreeBSD * Add missing dependency on qtWidgets
This commit is contained in:
parent
591d4a5c37
commit
96123c3429
|
|
@ -160,7 +160,7 @@ equals(HAVE_QT, "0") {
|
|||
} else {
|
||||
|
||||
DEFINES += HAVE_QT
|
||||
QT += core network xml sql
|
||||
QT += core network xml sql widgets
|
||||
|
||||
equals(HAVE_QT5, "1") {
|
||||
QT += designer printsupport
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@ void install_signal_handlers ()
|
|||
act.sa_sigaction = signal_handler;
|
||||
sigemptyset (&act.sa_mask);
|
||||
act.sa_flags = SA_SIGINFO;
|
||||
#if !defined(__APPLE__) && !defined(__OpenBSD__)
|
||||
#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
|
||||
act.sa_restorer = 0;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,13 @@
|
|||
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#endif
|
||||
|
||||
namespace tl
|
||||
{
|
||||
|
||||
|
|
@ -816,6 +823,16 @@ get_inst_path_internal ()
|
|||
return tl::absolute_path (buffer);
|
||||
}
|
||||
|
||||
#elif defined (__FreeBSD__)
|
||||
|
||||
char path[PATH_MAX];
|
||||
size_t len = PATH_MAX;
|
||||
const int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1};
|
||||
if (sysctl(&mib[0], 4, &path, &len, NULL, 0) == 0) {
|
||||
return tl::absolute_path(path);
|
||||
}
|
||||
return "";
|
||||
|
||||
#else
|
||||
|
||||
std::string pf = tl::sprintf ("/proc/%d/exe", getpid ());
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@
|
|||
#include <zlib.h>
|
||||
#ifdef _WIN32
|
||||
# include <io.h>
|
||||
#else
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "tlStream.h"
|
||||
|
|
|
|||
Loading…
Reference in New Issue