Skip to content

Commit

Permalink
Remove setting of INCLUDE_DIRS variable specific to PythonQtGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
jcfr committed Apr 16, 2014
1 parent 1b051e5 commit 8b691ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
17 changes: 0 additions & 17 deletions CMake/ctkMacroWrapPythonQt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,6 @@ macro(ctkMacroWrapPythonQt WRAPPING_NAMESPACE TARGET SRCS_LIST_NAME SOURCES IS_W
endif()
endforeach()

# PythonQtGenerator expects a colon ':' separated list
set(INCLUDE_DIRS_TO_WRAP)
foreach(include ${CTK_BASE_INCLUDE_DIRS})
set(INCLUDE_DIRS_TO_WRAP "${INCLUDE_DIRS_TO_WRAP}:${include}")
endforeach()

# Prepare custom_command argument
set(SOURCES_TO_WRAP_ARG)
foreach(source ${SOURCES_TO_WRAP})
Expand All @@ -234,16 +228,6 @@ macro(ctkMacroWrapPythonQt WRAPPING_NAMESPACE TARGET SRCS_LIST_NAME SOURCES IS_W
# Create intermediate output directory
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${wrap_int_dir})

# On Windows, to avoid "too long input" error, dump INCLUDE_DIRS_TO_WRAP into a file
if(WIN32)
# File containing the moc flags
set(include_dirs_to_wrap_filename includeDirsToWrap_${WRAPPING_NAMESPACE_UNDERSCORE}_${TARGET}.txt)
set(include_dirs_to_wrap_file ${CMAKE_CURRENT_BINARY_DIR}/${wrap_int_dir}${include_dirs_to_wrap_filename})
file(WRITE ${include_dirs_to_wrap_file} ${INCLUDE_DIRS_TO_WRAP})
# The arg passed to the custom command will be the file containing the list of include dirs to wrap
set(INCLUDE_DIRS_TO_WRAP ${include_dirs_to_wrap_file})
endif()

set(wrapper_init_cpp_filename ${WRAPPING_NAMESPACE_UNDERSCORE}_${TARGET}_init.cpp)
set(wrapper_init_cpp_file ${CMAKE_CURRENT_BINARY_DIR}/${wrap_int_dir}${wrapper_init_cpp_filename})

Expand All @@ -267,7 +251,6 @@ macro(ctkMacroWrapPythonQt WRAPPING_NAMESPACE TARGET SRCS_LIST_NAME SOURCES IS_W
-DWRAPPING_NAMESPACE:STRING=${WRAPPING_NAMESPACE}
-DTARGET:STRING=${TARGET}
-DSOURCES:STRING=${SOURCES_TO_WRAP_ARG}
-DINCLUDE_DIRS:STRING=${INCLUDE_DIRS_TO_WRAP}
-DOUTPUT_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}
-DWRAP_INT_DIR:STRING=${wrap_int_dir}
-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
Expand Down
4 changes: 2 additions & 2 deletions CMake/ctkScriptWrapPythonQt_Light.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# or from the command line using the following syntax:
#
# cmake -DWRAPPING_NAMESPACE:STRING=org.commontk -DTARGET:STRING=MyLib
# -DSOURCES:STRING="file1^^file2" -DINCLUDE_DIRS:STRING=/path1:/path2
# -DSOURCES:STRING="file1^^file2"
# -DWRAP_INT_DIR:STRING=subir/subir/
# -DOUTPUT_DIR:PATH=/path -DQT_QMAKE_EXECUTABLE:PATH=/path/to/qt/qmake
# -DPYTHON_EXECUTABLE:FILEPATH=/path/to/python
Expand Down Expand Up @@ -105,7 +105,7 @@ if(NOT DEFINED CMAKE_CURRENT_LIST_FILENAME)
endif()

# Check for non-defined var
foreach(var WRAPPING_NAMESPACE TARGET SOURCES INCLUDE_DIRS WRAP_INT_DIR HAS_DECORATOR)
foreach(var WRAPPING_NAMESPACE TARGET SOURCES WRAP_INT_DIR HAS_DECORATOR)
if(NOT DEFINED ${var})
message(FATAL_ERROR "${var} not specified when calling ctkScriptWrapPythonQt")
endif()
Expand Down

0 comments on commit 8b691ca

Please sign in to comment.