Hi Sascha, thanks for your answer.
On Mon, Dec 15, 2008 at 4:04 PM, Zelzer Sascha <[email protected]> wrote: > Hi, > > sorry for the late response. Unfortunately, Mac OS X is not officially > supported by MITK, although it should not be very hard to get it running. > If you don't need POCO (i.e. if you don't want to build the openCherry > application platform), you could just disable it by removing the Poco > directory entry in the file mitk/Utilities/CMakeLists.txt:14 . I should/will > introduce a CMake variable for that. > > If you want to try to compile the POCO stuff, try replacing the > POCO_UNIX_COMPILE_FLAGS in the file mitk/Utilities/Poco/CMakeLists.txt at > line 21 with: "-DPOCO_HAVE_IPv6" and you may have to remove the pthread and > rt linker dependencies in the mitk/Utilities/Poco/Foundation/CMakeLIsts.txt > file (line 10). MITK now compiles fine without POCO, I had to patch mitkMemoryUtilities.cpp (see below) and mitk/Utilities/CMakeLists.txt as you mentioned. The patch I proposed earlier in this thread for the OpenGL-Includes was wrong, I'm sorry. Line 25 of Core/Rendering/mitkGL.h is right as it is (#ifndef __APPLE__). > Let me know if you still got problems. A patch for a working Mac OS X build > system would also be very appreciated ;-) I'm working on it... Best regards, Stephan Here comes the patch for mitkMemoryUtilities.cpp (works on Mac OS X 10.5 with XCode 3.1.2 ): Index: mitkMemoryUtilities.cpp =================================================================== --- mitkMemoryUtilities.cpp (revision 16084) +++ mitkMemoryUtilities.cpp (working copy) @@ -21,6 +21,10 @@ #ifdef _MSC_VER #include <windows.h> #include <psapi.h> +#elif defined(__APPLE__) + #include <mach/task.h> + #include <mach/mach_init.h> + #include <mach/mach_host.h> #else #include <sys/sysinfo.h> #include <unistd.h> @@ -49,6 +53,12 @@ } CloseHandle( hProcess ); return size; +#elif defined(__APPLE__) + struct task_basic_info t_info; + mach_msg_type_number_t t_info_count = TASK_BASIC_INFO_COUNT; + task_info(current_task(), TASK_BASIC_INFO, (task_info_t)&t_info, &t_info_count); + size_t size = t_info.virtual_size; + return size; #else int size, res, shared, text, sharedLibs, stack, dirtyPages; if ( ! ReadStatmFromProcFS( &size, &res, &shared, &text, &sharedLibs, &stack, &dirtyPages ) ) @@ -70,6 +80,15 @@ statex.dwLength = sizeof (statex); GlobalMemoryStatusEx (&statex); return (size_t) statex.ullTotalPhys; +#elif defined(__APPLE__) + kern_return_t kr; + host_basic_info_data_t hostinfo; + int count = HOST_BASIC_INFO_COUNT; + kr = host_info(mach_host_self(), HOST_BASIC_INFO, (host_info_t)&hostinfo, (mach_msg_type_number_t*)&count); + if(kr == KERN_SUCCESS) + return (size_t)hostinfo.memory_size; + else + return 0; #else struct sysinfo info; if ( ! sysinfo( &info ) ) @@ -80,6 +99,7 @@ } #ifndef _MSC_VER +#ifndef __APPLE__ int mitk::MemoryUtilities::ReadStatmFromProcFS( int* size, int* res, int* shared, int* text, int* sharedLibs, int* stack, int* dirtyPages ) { int ret = 0; @@ -95,5 +115,5 @@ return ret; } #endif +#endif - ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
