Commit 6c1f1203 authored by Berk Geveci's avatar Berk Geveci

COMP: Fix to get it working with CMake 2.6

parent 87e5334c
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
PROJECT(VTK)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
# the following lines are for cross compiling support
# we may get here also from ParaView, in this case don't change the filename
......@@ -11,7 +14,7 @@ IF(NOT EXPORT_EXECUTABLES_FILE)
ENDIF(CMAKE_CROSSCOMPILING)
SET(EXPORT_EXECUTABLES_FILE "${CMAKE_BINARY_DIR}/VTKCompileToolsConfig.cmake")
SET(EXPORT_EXECUTABLES_PREFIX "")
SET(EXPORT_EXECUTABLES_NAMESPACE "")
FILE(WRITE "${EXPORT_EXECUTABLES_FILE}" "#generated by VTK, do not edit\n")
ENDIF(NOT EXPORT_EXECUTABLES_FILE)
......@@ -23,7 +26,8 @@ ENDIF(NOT COMMAND EXPORT)
# GET_PROPERTY() will be in cmake 2.6
IF(COMMAND GET_PROPERTY)
GET_PROPERTY(VTK_TARGET_SUPPORTS_SHARED_LIBS GLOBAL TARGET_SUPPORTS_SHARED_LIBS)
GET_PROPERTY(VTK_TARGET_SUPPORTS_SHARED_LIBS
GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
ELSE(COMMAND GET_PROPERTY)
SET(VTK_TARGET_SUPPORTS_SHARED_LIBS TRUE)
ENDIF(COMMAND GET_PROPERTY)
......
......@@ -16,7 +16,7 @@ ENDIF(BUILD_SHARED_LIBS AND CMAKE_SKIP_RPATH AND NOT WIN32)
IF(NOT CMAKE_CROSSCOMPILING)
ADD_EXECUTABLE(ProcessShader${ML_EXE_SUFFIX} ProcessShader.cxx)
TARGET_LINK_LIBRARIES(ProcessShader${ML_EXE_SUFFIX} vtksys)
EXPORT(TARGETS ProcessShader${ML_EXE_SUFFIX} FILE ${EXPORT_EXECUTABLES_FILE} PREFIX ${EXPORT_EXECUTABLES_PREFIX} APPEND)
EXPORT(TARGETS ProcessShader${ML_EXE_SUFFIX} FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND)
# Add shared link forwarding executable if necessary.
IF (NEED_SHARED_FORWARD)
......@@ -27,7 +27,7 @@ IF(NOT CMAKE_CROSSCOMPILING)
@ONLY IMMEDIATE)
ADD_EXECUTABLE(ProcessShader ${MaterialLibrary_BINARY_DIR}/ProcessShader-forward.c)
ADD_DEPENDENCIES(ProcessShader ProcessShader${ML_EXE_SUFFIX})
EXPORT(TARGETS ProcessShader FILE ${EXPORT_EXECUTABLES_FILE} PREFIX ${EXPORT_EXECUTABLES_PREFIX} APPEND)
EXPORT(TARGETS ProcessShader FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND)
ENDIF (NEED_SHARED_FORWARD)
ENDIF(NOT CMAKE_CROSSCOMPILING)
......
......@@ -23,7 +23,7 @@
IF(NOT CMAKE_CROSSCOMPILING)
ADD_EXECUTABLE(vtkParseOGLExt Tokenizer.cxx ParseOGLExt.cxx)
EXPORT(TARGETS vtkParseOGLExt FILE ${EXPORT_EXECUTABLES_FILE} PREFIX ${EXPORT_EXECUTABLES_PREFIX} APPEND)
EXPORT(TARGETS vtkParseOGLExt FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND)
ENDIF(NOT CMAKE_CROSSCOMPILING)
......
PROJECT(vtklibxml2 C)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
INCLUDE_REGULAR_EXPRESSION("^.*$")
SET(PACKAGE "vtklibxml2")
......@@ -285,7 +288,7 @@ SET(vtklibxml2_la_SOURCES
xpointer.c
)
INCLUDE_DIRECTORIES(${vtklibxml2_BINARY_DIR})
INCLUDE_DIRECTORIES(BEFORE ${vtklibxml2_BINARY_DIR})
IF(NOT BUILD_SHARED_LIBS)
ADD_DEFINITIONS(-DLIBXML_STATIC)
......
......@@ -36,7 +36,7 @@ ELSE (NOT UNIX)
SET(common_SRCS ${common_SRCS} tif_unix.c tif_fax3sm.c)
IF(NOT CMAKE_CROSSCOMPILING)
ADD_EXECUTABLE(mkg3states mkg3states.c)
EXPORT(TARGETS mkg3states FILE ${EXPORT_EXECUTABLES_FILE} PREFIX ${EXPORT_EXECUTABLES_PREFIX} APPEND)
EXPORT(TARGETS mkg3states FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND)
ENDIF(NOT CMAKE_CROSSCOMPILING)
GET_TARGET_PROPERTY(mkg3statesExe mkg3states LOCATION)
......
......@@ -73,7 +73,7 @@ IF(NOT CMAKE_CROSSCOMPILING)
ADD_EXECUTABLE(vtkVREncodeString
${VTK_SOURCE_DIR}/VolumeRendering/vtkVREncodeString.cxx
)
EXPORT(TARGETS vtkVREncodeString FILE ${EXPORT_EXECUTABLES_FILE} PREFIX ${EXPORT_EXECUTABLES_PREFIX} APPEND)
EXPORT(TARGETS vtkVREncodeString FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND)
ENDIF(NOT CMAKE_CROSSCOMPILING)
GET_TARGET_PROPERTY(ENCODE_EXE vtkVREncodeString LOCATION)
......
......@@ -9,7 +9,7 @@ IF(NOT CMAKE_CROSSCOMPILING)
IF (VTK_WRAP_TCL)
ADD_EXECUTABLE(vtkWrapTcl vtkWrapTcl.c vtkParse.tab.c)
ADD_EXECUTABLE(vtkWrapTclInit vtkWrapTclInit.c)
EXPORT(TARGETS vtkWrapTcl vtkWrapTclInit FILE ${EXPORT_EXECUTABLES_FILE} PREFIX ${EXPORT_EXECUTABLES_PREFIX} APPEND)
EXPORT(TARGETS vtkWrapTcl vtkWrapTclInit FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND)
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
INSTALL(TARGETS vtkWrapTcl vtkWrapTclInit
RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT Development # .exe, .dll
......@@ -21,7 +21,7 @@ IF(NOT CMAKE_CROSSCOMPILING)
ADD_EXECUTABLE(vtkWrapPython vtkWrapPython.c vtkParse.tab.c)
ADD_EXECUTABLE(vtkWrapPythonInit vtkWrapPythonInit.c)
TARGET_LINK_LIBRARIES(vtkWrapPython ${VTK_PYTHON_LIBRARIES})
EXPORT(TARGETS vtkWrapPython vtkWrapPythonInit FILE ${EXPORT_EXECUTABLES_FILE} PREFIX ${EXPORT_EXECUTABLES_PREFIX} APPEND)
EXPORT(TARGETS vtkWrapPython vtkWrapPythonInit FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND)
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
INSTALL(TARGETS vtkWrapPython vtkWrapPythonInit
RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT Development # .exe, .dll
......@@ -32,7 +32,7 @@ IF(NOT CMAKE_CROSSCOMPILING)
IF (VTK_WRAP_JAVA)
ADD_EXECUTABLE(vtkParseJava vtkParseJava.c vtkParse.tab.c)
ADD_EXECUTABLE(vtkWrapJava vtkWrapJava.c vtkParse.tab.c)
EXPORT(TARGETS vtkParseJava vtkWrapJava FILE ${EXPORT_EXECUTABLES_FILE} PREFIX ${EXPORT_EXECUTABLES_PREFIX} APPEND)
EXPORT(TARGETS vtkParseJava vtkWrapJava FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND)
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
INSTALL(TARGETS vtkParseJava vtkWrapJava
RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT Development # .exe, .dll
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment