90 if (NOT pascal_compiler) |
90 if (NOT pascal_compiler) |
91 message(FATAL_ERROR "No Pascal compiler found!") |
91 message(FATAL_ERROR "No Pascal compiler found!") |
92 endif (NOT pascal_compiler) |
92 endif (NOT pascal_compiler) |
93 |
93 |
94 |
94 |
95 #PASCAL FLAG SECTION |
95 set(pascal_compiler_flags ${noexecstack_flags} ${pascal_compiler_flags_cmn} ${hwengine_project}) |
96 set(pascal_compiler_flags ${noexecstack_flags} "-B" "-FE../bin" "-Fl../bin/" "-Cs2000000" "-vwi" ${hwengine_project}) |
|
97 |
|
98 if(OPTIMIZATIONS) |
|
99 set(pascal_compiler_flags "-O2" "-Xs" "-Nu" "-Si" ${pascal_compiler_flags}) |
|
100 if(APPLE AND NOT universal_build) |
|
101 set(pascal_compiler_flags "-fPIC" "-CfSSE2" ${pascal_compiler_flags}) #instruction set for ppc is 7400 |
|
102 endif() |
|
103 else(OPTIMIZATIONS) |
|
104 set(pascal_compiler_flags "-O-" "-gl" "-dDEBUGFILE" "-pg" "-vv" ${pascal_compiler_flags}) |
|
105 endif(OPTIMIZATIONS) |
|
106 |
96 |
107 if(LOWRES) |
97 if(LOWRES) |
108 set(pascal_compiler_flags "-dLOWRES" ${pascal_compiler_flags} ${hwengine_project}) |
98 set(pascal_compiler_flags "-dLOWRES" ${pascal_compiler_flags} ${hwengine_project}) |
109 endif(LOWRES) |
99 endif(LOWRES) |
110 |
|
111 #special handling of MSVC compiler (no static linking) |
|
112 if(MSVC) |
|
113 set(pascal_compiler_flags "-dMSVC" ${pascal_compiler_flags}) |
|
114 endif(MSVC) |
|
115 |
100 |
116 |
101 |
117 #DEPENDECIES AND EXECUTABLES SECTION |
102 #DEPENDECIES AND EXECUTABLES SECTION |
118 IF(APPLE) |
103 IF(APPLE) |
119 #let's build sdlmain, which is absent from the framework |
104 #let's build sdlmain, which is absent from the framework |
120 find_package(SDL REQUIRED) |
105 find_package(SDL REQUIRED) |
121 |
106 |
122 set(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH}) |
107 set(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH}) |
123 include_directories(${SDL_INCLUDE_DIR}) |
108 include_directories(${SDL_INCLUDE_DIR}) |
124 link_libraries(${SDL_LIBRARY}) |
109 link_libraries(${SDL_LIBRARY}) |
|
110 |
|
111 if(universal_build) |
|
112 #apparently this variable is not exported here |
|
113 set(CMAKE_OSX_ARCHITECTURES "i386;ppc7400") |
|
114 endif() |
125 |
115 |
126 add_library (SDLmain STATIC SDLMain.m) |
116 add_library (SDLmain STATIC SDLMain.m) |
127 set(engine_sources SDLmain ${engine_sources}) |
117 set(engine_sources SDLmain ${engine_sources}) |
128 ENDIF(APPLE) |
118 ENDIF(APPLE) |
129 |
119 |