--- a/cmake_modules/CMakePascalInformation.cmake Mon Mar 18 10:06:07 2013 +0100
+++ b/cmake_modules/CMakePascalInformation.cmake Mon Mar 18 12:30:09 2013 +0100
@@ -70,9 +70,10 @@
# SET(CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP})
#ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Ada_FLAG_SEP)
-#IF(NOT CMAKE_INCLUDE_FLAG_Ada)
-# SET(CMAKE_INCLUDE_FLAG_Ada ${CMAKE_INCLUDE_FLAG_C})
-#ENDIF(NOT CMAKE_INCLUDE_FLAG_Ada)
+IF(NOT CMAKE_INCLUDE_FLAG_Pascal)
+ #amazing, fpc: -I<x> Add <x> to include path
+ SET(CMAKE_INCLUDE_FLAG_Pascal ${CMAKE_INCLUDE_FLAG_C})
+ENDIF(NOT CMAKE_INCLUDE_FLAG_Pascal)
#IF(NOT CMAKE_INCLUDE_FLAG_SEP_Ada)
# SET(CMAKE_INCLUDE_FLAG_SEP_Ada ${CMAKE_INCLUDE_FLAG_SEP_C})
@@ -117,6 +118,9 @@
# <CMAKE_AR>
# <CMAKE_RANLIB>
+if (NOT EXECUTABLE_OUTPUT_PATH)
+ set (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
+endif (NOT EXECUTABLE_OUTPUT_PATH)
# create an Ada shared library
IF(NOT CMAKE_Ada_CREATE_SHARED_LIBRARY)
@@ -139,7 +143,8 @@
# compile a Pascal file into an object file
IF(NOT CMAKE_Pascal_COMPILE_OBJECT)
- SET(CMAKE_Pascal_COMPILE_OBJECT "<CMAKE_Pascal_COMPILER> <FLAGS> <SOURCE> -Cn")
+ SET(CMAKE_Pascal_COMPILE_OBJECT
+ "<CMAKE_Pascal_COMPILER> <FLAGS> <SOURCE> -Cn -FE${EXECUTABLE_OUTPUT_PATH} -FU${CMAKE_CURRENT_BINARY_DIR} -Fi${CMAKE_CURRENT_BINARY_DIR}")
#"<CMAKE_Pascal_COMPILER> <FLAGS> <SOURCE> -o<OBJECT> -Cn
ENDIF(NOT CMAKE_Pascal_COMPILE_OBJECT)
@@ -174,9 +179,6 @@
IF(NOT CMAKE_Pascal_LINK_EXECUTABLE)
#GET_FILENAME_COMPONENT(COMPILER_LOCATION "${CMAKE_Pascal_COMPILER}" PATH)
- 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} <CMAKE_Ada_LINK_FLAGS> <LINK_FLAGS> <TARGET_BASE>.adb -cargs <FLAGS> -largs <LINK_LIBRARIES>")