*BSD support

This commit is contained in:
DepressedTWM 2026-06-12 10:46:40 -04:00
parent db037c6b31
commit d0b461264f
4 changed files with 8 additions and 10 deletions

View file

@ -355,16 +355,16 @@ find_package(Ruby 3.0 REQUIRED COMPONENTS Development)
pkg_check_modules(VORBISFILE REQUIRED vorbisfile) pkg_check_modules(VORBISFILE REQUIRED vorbisfile)
find_package_handle_standard_args(pixman-1 DEFAULT_MSG PIXMAN_LIBRARY PIXMAN_INCLUDE_DIR) find_package_handle_standard_args(pixman-1 DEFAULT_MSG PIXMAN_LIBRARY PIXMAN_INCLUDE_DIR)
mark_as_advanced(PIXMAN_INCLUDE_DIR PIXMAN_LIBRARY) mark_as_advanced(PIXMAN_INCLUDE_DIR PIXMAN_LIBRARY)
if(!EMSCRIPTEN) if(EMSCRIPTEN)
else()
find_package(OpenSSL CONFIG REQUIRED COMPONENTS Crypto) find_package(OpenSSL CONFIG REQUIRED COMPONENTS Crypto)
pkg_check_modules(SIGC2 REQUIRED sigc++-2.0) pkg_check_modules(SIGC2 REQUIRED sigc++-2.0)
pkg_check_modules(LIBZIP REQUIRED libzip) pkg_check_modules(LIBZIP REQUIRED libzip)
endif() endif()
target_compile_definitions(${PROJECT_NAME} target_compile_definitions(${PROJECT_NAME} PRIVATE ${DEFINES})
PRIVATE
${DEFINES})
if(!EMSCRIPTEN) if(EMSCRIPTEN)
target_include_directories(${PROJECT_NAME} PRIVATE src include ${PIXMAN_INCLUDE_DIR} target_include_directories(${PROJECT_NAME} PRIVATE src include ${PIXMAN_INCLUDE_DIR}
${Ruby_INCLUDE_DIRS} Boost::boost ${Boost_INCLUDE_DIRS} ${VORBISFILE_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS}) ${Ruby_INCLUDE_DIRS} Boost::boost ${Boost_INCLUDE_DIRS} ${VORBISFILE_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS})

View file

@ -133,8 +133,7 @@ void Config::read(int argc, char *argv[]){
try{ try{
po::parsed_options cmdPo = po::command_line_parser(argc, argv).options(podesc).run(); po::parsed_options cmdPo = po::command_line_parser(argc, argv).options(podesc).run();
po::store(cmdPo, vm); po::store(cmdPo, vm);
} }catch (po::error &error){
catch (po::error &error){
Debug() << "[config] Command line:" << error.what(); Debug() << "[config] Command line:" << error.what();
} }

View file

@ -226,7 +226,7 @@ int main(int argc, char *argv[]){
SDL_SetHint(SDL_HINT_AUDIO_DEVICE_STREAM_ROLE, "Game"); SDL_SetHint(SDL_HINT_AUDIO_DEVICE_STREAM_ROLE, "Game");
//X11 work on *BSD,Solaris too! //X11 work on *BSD,Solaris too!
#if defined(__linux__) || defined(BSD) || defined(__sun) #if defined(__linux__) || defined(BSD) || defined(__sun)
SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0"); SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0");
#if SDL_VERSION_ATLEAST(3, 4, 10) #if SDL_VERSION_ATLEAST(3, 4, 10)
SDL_SetHint(SDL_HINT_VIDEO_X11_ENABLE_XSYNC_EXT, "1"); SDL_SetHint(SDL_HINT_VIDEO_X11_ENABLE_XSYNC_EXT, "1");
#endif #endif
@ -331,7 +331,7 @@ int main(int argc, char *argv[]){
/* OSX and Windows have their own native ways of /* OSX and Windows have their own native ways of
* dealing with icons; don't interfere with them */ * dealing with icons; don't interfere with them */
#ifdef __LINUX__ #ifdef defined(__linux__) || defined(BSD)
setupWindowIcon(conf, win); setupWindowIcon(conf, win);
#elif __EMSCRIPTEN__ #elif __EMSCRIPTEN__
Debug() << "meow"; Debug() << "meow";

View file

@ -22,7 +22,6 @@
#ifndef SHAREDSTATE_H #ifndef SHAREDSTATE_H
#define SHAREDSTATE_H #define SHAREDSTATE_H
// #include <sigc++/signal.h>
#include <sigc++-2.0/sigc++/signal.h> #include <sigc++-2.0/sigc++/signal.h>
#define shState SharedState::instance #define shState SharedState::instance