equal
deleted
inserted
replaced
88 |
88 |
89 if(fpc_version) |
89 if(fpc_version) |
90 string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" fpc_vers_major "${fpc_version}") |
90 string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" fpc_vers_major "${fpc_version}") |
91 string(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" fpc_vers_minor "${fpc_version}") |
91 string(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" fpc_vers_minor "${fpc_version}") |
92 string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" fpc_vers_patch "${fpc_version}") |
92 string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" fpc_vers_patch "${fpc_version}") |
93 message(STATUS "Freepascal version detected: ${fpc_vers_major}.${fpc_vers_minor}.${fpc_vers_patch}") |
93 message(STATUS "Freepascal version detected: ${fpc_vers_major}.${fpc_vers_minor}") |
94 math(EXPR fpc_ver "${fpc_vers_major}*10000 + ${fpc_vers_minor}*100 + ${fpc_vers_patch}") |
94 math(EXPR fpc_ver "${fpc_vers_major}*10000 + ${fpc_vers_minor}*100 + ${fpc_vers_patch}") |
95 |
95 |
96 if(fpc_ver LESS "020200") |
96 if(fpc_ver LESS "020200") |
97 message(FATAL_ERROR "Minimum required version of FreePascal is 2.2.0") |
97 message(FATAL_ERROR "Minimum required version of FreePascal is 2.2.0") |
98 elseif(APPLE AND x86_64_build AND fpc_ver LESS "020400") |
98 elseif(APPLE AND x86_64_build AND fpc_ver LESS "020400") |
118 ELSE() |
118 ELSE() |
119 #let's build sdlmain, which is absent from the framework |
119 #let's build sdlmain, which is absent from the framework |
120 find_package(SDL REQUIRED) |
120 find_package(SDL REQUIRED) |
121 |
121 |
122 set(CMAKE_OSX_ARCHITECTURES "x86_64;i386;ppc7400") |
122 set(CMAKE_OSX_ARCHITECTURES "x86_64;i386;ppc7400") |
123 set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) |
123 set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) |
124 include_directories(${SDL_INCLUDE_DIR}) |
124 include_directories(${SDL_INCLUDE_DIR}) |
125 |
125 |
126 add_library (SDLmain STATIC SDLMain.m) |
126 add_library (SDLmain STATIC SDLMain.m) |
127 # set_target_properties(SDLmain PROPERTIES COMPILE_FLAGS "-mmacosx-version-min=${minimum_macosx} --sysroot=${CMAKE_OSX_SYSROOT} ") |
127 # set_target_properties(SDLmain PROPERTIES COMPILE_FLAGS "-mmacosx-version-min=${minimum_macosx} --sysroot=${CMAKE_OSX_SYSROOT} ") |
128 |
128 |