fixss
This commit is contained in:
parent
b9c84ab7e9
commit
81f5909095
@ -10,9 +10,10 @@
|
|||||||
# ::
|
# ::
|
||||||
#
|
#
|
||||||
# SWIG_ADD_LIBRARY(<name>
|
# SWIG_ADD_LIBRARY(<name>
|
||||||
# <LANGUAGE> language>
|
# [TYPE <SHARED|MODULE|STATIC|USE_BUILD_SHARED_LIBS>]
|
||||||
# [TYPE <SHARED|MODULE|STATIC>]
|
# LANGUAGE <language>
|
||||||
# [[SOURCES] <file>...])
|
# SOURCES <file>...
|
||||||
|
# )
|
||||||
# - Define swig module with given name and specified language
|
# - Define swig module with given name and specified language
|
||||||
# SWIG_LINK_LIBRARIES(name [ libraries ])
|
# SWIG_LINK_LIBRARIES(name [ libraries ])
|
||||||
# - Link libraries to swig module
|
# - Link libraries to swig module
|
||||||
@ -56,7 +57,8 @@
|
|||||||
set(SWIG_CXX_EXTENSION "cxx")
|
set(SWIG_CXX_EXTENSION "cxx")
|
||||||
set(SWIG_EXTRA_LIBRARIES "")
|
set(SWIG_EXTRA_LIBRARIES "")
|
||||||
|
|
||||||
set(SWIG_PYTHON_EXTRA_FILE_EXTENSION "py")
|
set(SWIG_PYTHON_EXTRA_FILE_EXTENSIONS ".py")
|
||||||
|
set(SWIG_JAVA_EXTRA_FILE_EXTENSIONS ".java" "JNI.java")
|
||||||
|
|
||||||
#
|
#
|
||||||
# For given swig module initialize variables associated with it
|
# For given swig module initialize variables associated with it
|
||||||
@ -80,10 +82,6 @@ macro(SWIG_MODULE_INITIALIZE name language)
|
|||||||
set(SWIG_MODULE_${name}_REAL_NAME "_${name}")
|
set(SWIG_MODULE_${name}_REAL_NAME "_${name}")
|
||||||
elseif("x${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "xPERL")
|
elseif("x${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "xPERL")
|
||||||
set(SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow")
|
set(SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow")
|
||||||
elseif("x${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "xCSHARP")
|
|
||||||
# This makes sure that the name used in the generated DllImport
|
|
||||||
# matches the library name created by CMake
|
|
||||||
set(SWIG_MODULE_${name}_EXTRA_FLAGS "-dllimport;${name}")
|
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
@ -122,9 +120,11 @@ macro(SWIG_GET_EXTRA_OUTPUT_FILES language outfiles generatedpath infile)
|
|||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
foreach(it ${SWIG_${language}_EXTRA_FILE_EXTENSION})
|
foreach(it ${SWIG_${language}_EXTRA_FILE_EXTENSIONS})
|
||||||
set(${outfiles} ${${outfiles}}
|
set(extra_file "${generatedpath}/${SWIG_GET_EXTRA_OUTPUT_FILES_module_basename}${it}")
|
||||||
"${generatedpath}/${SWIG_GET_EXTRA_OUTPUT_FILES_module_basename}.${it}")
|
list(APPEND ${outfiles} ${extra_file})
|
||||||
|
# Treat extra outputs as plain files regardless of language.
|
||||||
|
set_property(SOURCE "${extra_file}" PROPERTY LANGUAGE "")
|
||||||
endforeach()
|
endforeach()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
@ -190,6 +190,13 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
|
|||||||
if(swig_source_file_cplusplus)
|
if(swig_source_file_cplusplus)
|
||||||
set(swig_special_flags ${swig_special_flags} "-c++")
|
set(swig_special_flags ${swig_special_flags} "-c++")
|
||||||
endif()
|
endif()
|
||||||
|
if("x${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "xCSHARP")
|
||||||
|
if(NOT ";${swig_source_file_flags};${CMAKE_SWIG_FLAGS};" MATCHES ";-dllimport;")
|
||||||
|
# This makes sure that the name used in the generated DllImport
|
||||||
|
# matches the library name created by CMake
|
||||||
|
set(SWIG_MODULE_${name}_EXTRA_FLAGS "-dllimport;${name}")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
set(swig_extra_flags)
|
set(swig_extra_flags)
|
||||||
if(SWIG_MODULE_${name}_EXTRA_FLAGS)
|
if(SWIG_MODULE_${name}_EXTRA_FLAGS)
|
||||||
set(swig_extra_flags ${swig_extra_flags} ${SWIG_MODULE_${name}_EXTRA_FLAGS})
|
set(swig_extra_flags ${swig_extra_flags} ${SWIG_MODULE_${name}_EXTRA_FLAGS})
|
||||||
@ -210,6 +217,7 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
|
|||||||
"${swig_source_file_fullname}"
|
"${swig_source_file_fullname}"
|
||||||
MAIN_DEPENDENCY "${swig_source_file_fullname}"
|
MAIN_DEPENDENCY "${swig_source_file_fullname}"
|
||||||
DEPENDS ${SWIG_MODULE_${name}_EXTRA_DEPS}
|
DEPENDS ${SWIG_MODULE_${name}_EXTRA_DEPS}
|
||||||
|
IMPLICIT_DEPENDS CXX "${swig_source_file_fullname}"
|
||||||
COMMENT "Swig source")
|
COMMENT "Swig source")
|
||||||
set_source_files_properties("${swig_generated_file_fullname}" ${swig_extra_generated_files}
|
set_source_files_properties("${swig_generated_file_fullname}" ${swig_extra_generated_files}
|
||||||
PROPERTIES GENERATED 1)
|
PROPERTIES GENERATED 1)
|
||||||
@ -229,8 +237,6 @@ endmacro()
|
|||||||
|
|
||||||
|
|
||||||
macro(SWIG_ADD_LIBRARY name)
|
macro(SWIG_ADD_LIBRARY name)
|
||||||
|
|
||||||
include(CMakeParseArguments)
|
|
||||||
set(options "")
|
set(options "")
|
||||||
set(oneValueArgs LANGUAGE
|
set(oneValueArgs LANGUAGE
|
||||||
TYPE)
|
TYPE)
|
||||||
@ -247,6 +253,8 @@ macro(SWIG_ADD_LIBRARY name)
|
|||||||
|
|
||||||
if(NOT DEFINED _SAM_TYPE)
|
if(NOT DEFINED _SAM_TYPE)
|
||||||
set(_SAM_TYPE MODULE)
|
set(_SAM_TYPE MODULE)
|
||||||
|
elseif("${_SAM_TYPE}" STREQUAL "USE_BUILD_SHARED_LIBS")
|
||||||
|
unset(_SAM_TYPE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
swig_module_initialize(${name} ${_SAM_LANGUAGE})
|
swig_module_initialize(${name} ${_SAM_LANGUAGE})
|
||||||
@ -273,7 +281,9 @@ macro(SWIG_ADD_LIBRARY name)
|
|||||||
${_SAM_TYPE}
|
${_SAM_TYPE}
|
||||||
${swig_generated_sources}
|
${swig_generated_sources}
|
||||||
${swig_other_sources})
|
${swig_other_sources})
|
||||||
set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES NO_SONAME ON)
|
if("${_SAM_TYPE}" STREQUAL "MODULE")
|
||||||
|
set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES NO_SONAME ON)
|
||||||
|
endif()
|
||||||
string(TOLOWER "${_SAM_LANGUAGE}" swig_lowercase_language)
|
string(TOLOWER "${_SAM_LANGUAGE}" swig_lowercase_language)
|
||||||
if ("${swig_lowercase_language}" STREQUAL "octave")
|
if ("${swig_lowercase_language}" STREQUAL "octave")
|
||||||
set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "")
|
set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "")
|
||||||
@ -291,7 +301,9 @@ macro(SWIG_ADD_LIBRARY name)
|
|||||||
set_target_properties (${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".jnilib")
|
set_target_properties (${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".jnilib")
|
||||||
endif ()
|
endif ()
|
||||||
elseif ("${swig_lowercase_language}" STREQUAL "lua")
|
elseif ("${swig_lowercase_language}" STREQUAL "lua")
|
||||||
set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "")
|
if("${_SAM_TYPE}" STREQUAL "MODULE")
|
||||||
|
set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "")
|
||||||
|
endif()
|
||||||
elseif ("${swig_lowercase_language}" STREQUAL "python")
|
elseif ("${swig_lowercase_language}" STREQUAL "python")
|
||||||
# this is only needed for the python case where a _modulename.so is generated
|
# this is only needed for the python case where a _modulename.so is generated
|
||||||
set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "")
|
set_target_properties(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "")
|
||||||
@ -319,6 +331,9 @@ macro(SWIG_ADD_LIBRARY name)
|
|||||||
if (APPLE)
|
if (APPLE)
|
||||||
set_target_properties (${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".bundle")
|
set_target_properties (${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".bundle")
|
||||||
endif ()
|
endif ()
|
||||||
|
else()
|
||||||
|
# assume empty prefix because we expect the module to be dynamically loaded
|
||||||
|
set_target_properties (${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "")
|
||||||
endif ()
|
endif ()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
@ -332,4 +347,3 @@ macro(SWIG_LINK_LIBRARIES name)
|
|||||||
message(SEND_ERROR "Cannot find Swig library \"${name}\".")
|
message(SEND_ERROR "Cannot find Swig library \"${name}\".")
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
4
packages/raptor/doc/CMakeLists.txt
Normal file
4
packages/raptor/doc/CMakeLists.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
include(PackageDocs)
|
||||||
|
|
Reference in New Issue
Block a user