134 #generic folder where our libraries reside |
134 #generic folder where our libraries reside |
135 add_flag_append(CMAKE_Pascal_FLAGS "-Fl${LIBRARY_OUTPUT_PATH}") |
135 add_flag_append(CMAKE_Pascal_FLAGS "-Fl${LIBRARY_OUTPUT_PATH}") |
136 |
136 |
137 #DEPENDECIES AND EXECUTABLES SECTION |
137 #DEPENDECIES AND EXECUTABLES SECTION |
138 if(APPLE AND (NOT BUILD_ENGINE_LIBRARY)) |
138 if(APPLE AND (NOT BUILD_ENGINE_LIBRARY)) |
139 #on OSX we need to provide the SDL_main() function when building as executable |
139 #on OSX we need to provide the SDL_main() function when building as |
|
140 #executable and the entry point too |
140 add_subdirectory(sdlmain) |
141 add_subdirectory(sdlmain) |
141 list(APPEND HW_LINK_LIBS SDLmain) |
142 list(APPEND HW_LINK_LIBS SDLmain) |
|
143 add_flag_append(CMAKE_Pascal_FLAGS "-k-lsdlmain") |
|
144 add_flag_append(CMAKE_Pascal_FLAGS "-XMSDL_main") |
|
145 #OpenGL deps |
|
146 add_flag_append(CMAKE_Pascal_FLAGS "-k-framework -kCocoa") |
|
147 add_flag_append(CMAKE_Pascal_FLAGS "-k-framework -kOpenGL") |
|
148 |
|
149 #set the correct library or framework style depending on the main SDL |
|
150 string(FIND "${SDL_LIBRARY}" "dylib" sdl_framework) |
|
151 if(${sdl_framework} GREATER -1) |
|
152 add_flag_append(CMAKE_Pascal_FLAGS "-k-lsdl -k-lsdl_image -k-lsdl_mixer -k-lsdl_ttf -k-lsdl_net") |
|
153 else() |
|
154 add_flag_append(CMAKE_Pascal_FLAGS "-k-framework -kSDL -k-framework -kSDL_image -k-framework -k SDL_mixer -k-framework -k SDL_net -k-framework -kSDL_net") |
|
155 endif() |
142 endif() |
156 endif() |
143 |
157 |
144 if(LIBAV_FOUND) |
158 if(LIBAV_FOUND) |
145 add_subdirectory(avwrapper) |
159 add_subdirectory(avwrapper) |
146 list(APPEND HW_LINK_LIBS avwrapper) |
160 list(APPEND HW_LINK_LIBS avwrapper) |