91 add_flag_prepend(CMAKE_Pascal_FLAGS_RELEASE -Si) |
91 add_flag_prepend(CMAKE_Pascal_FLAGS_RELEASE -Si) |
92 endif() |
92 endif() |
93 |
93 |
94 |
94 |
95 #DEPENDECIES AND EXECUTABLES SECTION |
95 #DEPENDECIES AND EXECUTABLES SECTION |
96 if(APPLE) |
96 if(NOT ${BUILD_ENGINE_LIBRARY} AND APPLE) |
97 if(CMAKE_OSX_ARCHITECTURES) |
|
98 #parse this system variable and adjust only the powerpc syntax to be compatible with -P |
|
99 string(REGEX MATCH "[pP][pP][cC]+" powerpc_build "${CMAKE_OSX_ARCHITECTURES}") |
|
100 string(REGEX MATCH "[iI]386+" i386_build "${CMAKE_OSX_ARCHITECTURES}") |
|
101 string(REGEX MATCH "[xX]86_64+" x86_64_build "${CMAKE_OSX_ARCHITECTURES}") |
|
102 if(x86_64_build) |
|
103 add_flag_prepend(CMAKE_Pascal_FLAGS -Px86_64) |
|
104 elseif(i386_build) |
|
105 add_flag_prepend(CMAKE_Pascal_FLAGS -Pi386) |
|
106 elseif(powerpc_build) |
|
107 add_flag_prepend(CMAKE_Pascal_FLAGS -Ppowerpc) |
|
108 else() |
|
109 message(FATAL_ERROR "Unknown architecture present in CMAKE_OSX_ARCHITECTURES (${CMAKE_OSX_ARCHITECTURES})") |
|
110 endif() |
|
111 list(LENGTH CMAKE_OSX_ARCHITECTURES num_of_archs) |
|
112 if(num_of_archs GREATER 1) |
|
113 message(${WARNING} "Only one architecture in CMAKE_OSX_ARCHITECTURES is currently supported, picking the first one") |
|
114 endif() |
|
115 elseif(CMAKE_SIZEOF_VOID_P MATCHES "8") |
|
116 #if that variable is not set check if we are on x86_64 and if so force it, else use default |
|
117 add_flag_prepend(CMAKE_Pascal_FLAGS -Px86_64) |
|
118 endif() |
|
119 |
|
120 #on OSX we need to provide the SDL_main() function when building as executable |
97 #on OSX we need to provide the SDL_main() function when building as executable |
121 if(NOT BUILD_ENGINE_LIBRARY) |
98 add_subdirectory(sdlmain) |
122 add_subdirectory(sdlmain) |
99 list(APPEND HW_LINK_LIBS SDLmain) |
123 list(APPEND HW_LINK_LIBS SDLmain) |
100 add_flag_append(CMAKE_Pascal_FLAGS -Fl${LIBRARY_OUTPUT_PATH}) |
124 add_flag_append(CMAKE_Pascal_FLAGS -Fl${LIBRARY_OUTPUT_PATH}) |
101 endif() |
125 endif() |
|
126 endif(APPLE) |
|
127 |
102 |
128 if(FFMPEG_FOUND) |
103 if(FFMPEG_FOUND) |
129 add_subdirectory(avwrapper) |
104 add_subdirectory(avwrapper) |
130 list(APPEND HW_LINK_LIBS avwrapper) |
105 list(APPEND HW_LINK_LIBS avwrapper) |
131 add_definitions(-dUSE_VIDEO_RECORDING) |
106 add_definitions(-dUSE_VIDEO_RECORDING) |