# HG changeset patch # User koda # Date 1363597567 -3600 # Node ID 0c08d07e791a65e78d0dba3e2952d6af896cdf45 # Parent 48cf2ccb83c677e0d90daf9536f405700d15f54b this should make cmake-pascal stuff work on linux too diff -r 48cf2ccb83c6 -r 0c08d07e791a cmake_modules/CMakeDeterminePascalCompiler.cmake --- a/cmake_modules/CMakeDeterminePascalCompiler.cmake Mon Mar 18 02:07:58 2013 +0100 +++ b/cmake_modules/CMakeDeterminePascalCompiler.cmake Mon Mar 18 10:06:07 2013 +0100 @@ -55,7 +55,7 @@ # configure variables set in this file for fast reload later on #CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakePascalCompiler.cmake.in CONFIGURE_FILE(${CMAKE_MODULE_PATH}/CMakePascalCompiler.cmake.in - "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/${CMAKE_VERSION}/CMakePascalCompiler.cmake" + "${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CMakePascalCompiler.cmake" IMMEDIATE) MARK_AS_ADVANCED(CMAKE_AR) diff -r 48cf2ccb83c6 -r 0c08d07e791a cmake_modules/CMakePascalInformation.cmake --- a/cmake_modules/CMakePascalInformation.cmake Mon Mar 18 02:07:58 2013 +0100 +++ b/cmake_modules/CMakePascalInformation.cmake Mon Mar 18 10:06:07 2013 +0100 @@ -174,7 +174,10 @@ IF(NOT CMAKE_Pascal_LINK_EXECUTABLE) #GET_FILENAME_COMPONENT(COMPILER_LOCATION "${CMAKE_Pascal_COMPILER}" PATH) - message("look here ${CMAKE_CURRENT_BINARY_DIR}") + if (NOT EXECUTABLE_OUTPUT_PATH) + set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) + endif() + message("look here ${CMAKE_CURRENT_BINARY_DIR} ${EXECUTABLE_OUTPUT_PATH}") set(CMAKE_Pascal_LINK_EXECUTABLE "${EXECUTABLE_OUTPUT_PATH}/ppas.sh") # SET(CMAKE_Pascal_LINK_EXECUTABLE "${CMAKE_Pascal_COMPILER} .adb -cargs -largs ") ENDIF(NOT CMAKE_Pascal_LINK_EXECUTABLE) diff -r 48cf2ccb83c6 -r 0c08d07e791a cmake_modules/CMakeTestPascalCompiler.cmake --- a/cmake_modules/CMakeTestPascalCompiler.cmake Mon Mar 18 02:07:58 2013 +0100 +++ b/cmake_modules/CMakeTestPascalCompiler.cmake Mon Mar 18 10:06:07 2013 +0100 @@ -6,10 +6,9 @@ IF(NOT CMAKE_Pascal_COMPILER_WORKS) MESSAGE(STATUS "Check for working Pascal compiler: ${CMAKE_Pascal_COMPILER}") - FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testpascalcompiler.pas + FILE(WRITE ${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CMakeTmp/testpascalcompiler.pas "program testPascalCompiler; begin - end. ") diff -r 48cf2ccb83c6 -r 0c08d07e791a hedgewars/CMakeLists.txt --- a/hedgewars/CMakeLists.txt Mon Mar 18 02:07:58 2013 +0100 +++ b/hedgewars/CMakeLists.txt Mon Mar 18 10:06:07 2013 +0100 @@ -204,9 +204,14 @@ endif() -set(CMAKE_Pascal_FLAGS "-B -FE${PROJECT_BINARY_DIR}/bin -FU${PROJECT_BINARY_DIR}/hedgewars -vm4079,4080,4081 -Fl${PROJECT_BINARY_DIR}/bin -Px86_64 -Fi${PROJECT_BINARY_DIR}/hedgewars -k-L${PROJECT_BINARY_DIR}/bin -Cs2000000 -vewnq -dDEBUGFILE -k-llua -k${SDLMAIN_LIB}") +set(CMAKE_Pascal_FLAGS "-B -FE${PROJECT_BINARY_DIR}/bin -FU${PROJECT_BINARY_DIR}/hedgewars -vm4079,4080,4081 -Fl${PROJECT_BINARY_DIR}/bin -Fi${PROJECT_BINARY_DIR}/hedgewars -k-L${PROJECT_BINARY_DIR}/bin -Cs2000000 -vewnq -dDEBUGFILE") add_executable(hwengine hwengine.pas) +if(APPLE) + set(CMAKE_Pascal_FLAGS "-Px86_64 -k-llua -k${SDLMAIN_LIB} ${CMAKE_Pascal_FLAGS}") +else() + set(CMAKE_Pascal_FLAGS "-Pi386 ${CMAKE_Pascal_FLAGS}") +endif() set(fpc_flags ${pascal_flags} ${hwengine_project}) #add_custom_target(hwengine ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}")