From fa26352f4b7a8a32351a664f23a251ba08bc9556 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Tue, 18 Sep 2018 19:50:23 +0200
Subject: patch from 0.7.0

* Link libintl on haiku.
* Fix install directories.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8a66e3c..f45efb3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,12 +23,12 @@ include( docbook-to-man )
 #-------------------------------------------------------------------------------
 # where the game resources are installed
 if( NOT PTB_INSTALL_DATA_DIR )
-  set( PTB_INSTALL_DATA_DIR share/plee-the-bear )
+  set( PTB_INSTALL_DATA_DIR data/plee-the-bear )
 endif( NOT PTB_INSTALL_DATA_DIR )
 
 # where the game executables are installed
 if( NOT PTB_INSTALL_EXECUTABLE_DIR )
-  set( PTB_INSTALL_EXECUTABLE_DIR bin )
+  set( PTB_INSTALL_EXECUTABLE_DIR bin${CMAKE_HAIKU_SECONDARY_ARCH_SUBDIR} )
 endif( NOT PTB_INSTALL_EXECUTABLE_DIR )
 
 # where the game libraries (the items) are installed
@@ -38,7 +38,7 @@ if( NOT PTB_INSTALL_CUSTOM_LIBRARY_DIR )
       "${PTB_INSTALL_EXECUTABLE_DIR}"
       )
   else( WIN32 )
-    set( PTB_INSTALL_CUSTOM_LIBRARY_DIR lib )
+    set( PTB_INSTALL_CUSTOM_LIBRARY_DIR lib${CMAKE_HAIKU_SECONDARY_ARCH_SUBDIR} )
   endif( WIN32 )
 endif( NOT PTB_INSTALL_CUSTOM_LIBRARY_DIR )
 
@@ -140,7 +140,7 @@ subdirs(
 
 install(
   DIRECTORY "lib/item-description"
-  DESTINATION "share/bear-factory/plee-the-bear"
+  DESTINATION "data/bear-factory/plee-the-bear"
   FILE_PERMISSIONS OWNER_READ OWNER_WRITE
   GROUP_READ
   WORLD_READ
diff --git a/launcher/src/CMakeLists.txt b/launcher/src/CMakeLists.txt
index d4a6ee3..a1e02c5 100644
--- a/launcher/src/CMakeLists.txt
+++ b/launcher/src/CMakeLists.txt
@@ -121,13 +121,13 @@ set(
   ${CLAW_APPLICATION_LIBRARIES}
   )
 
-if(WIN32)
+if(WIN32 OR HAIKU)
   set(
     PTB_LAUNCHER_LINK_LIBRARIES
     ${PTB_LAUNCHER_LINK_LIBRARIES}
     ${SDL2_LIBRARY}
     intl )
-endif(WIN32)
+endif(WIN32 OR HAIKU)
 
 # FIXME: it would be even better to use "sdl-config"
 if(APPLE)
-- 
2.19.0

