mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
CMake: Simplify Interrogate.cmake's add_python_module() keyword handling
This commit is contained in:
parent
368cdc2802
commit
58dd889165
@ -257,19 +257,16 @@ function(add_python_module module)
|
|||||||
set(sources_abs)
|
set(sources_abs)
|
||||||
set(extensions)
|
set(extensions)
|
||||||
|
|
||||||
set(link_keyword OFF)
|
set(keyword)
|
||||||
set(import_keyword OFF)
|
|
||||||
foreach(arg ${ARGN})
|
foreach(arg ${ARGN})
|
||||||
if(arg STREQUAL "LINK")
|
if(arg STREQUAL "LINK" OR arg STREQUAL "IMPORT")
|
||||||
set(link_keyword ON)
|
set(keyword "${arg}")
|
||||||
set(import_keyword OFF)
|
elseif(keyword STREQUAL "LINK")
|
||||||
elseif(arg STREQUAL "IMPORT")
|
|
||||||
set(link_keyword OFF)
|
|
||||||
set(import_keyword ON)
|
|
||||||
elseif(link_keyword)
|
|
||||||
list(APPEND link_targets "${arg}")
|
list(APPEND link_targets "${arg}")
|
||||||
elseif(import_keyword)
|
set(keyword)
|
||||||
|
elseif(keyword STREQUAL "IMPORT")
|
||||||
list(APPEND import_flags "-import" "${arg}")
|
list(APPEND import_flags "-import" "${arg}")
|
||||||
|
set(keyword)
|
||||||
else()
|
else()
|
||||||
list(APPEND targets "${arg}")
|
list(APPEND targets "${arg}")
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user