cosmetic change for projects without any modules
This commit is contained in:
parent
2b03445717
commit
c382c9044c
@ -207,14 +207,16 @@ def gen_cmakelists(config, relative_path, modules):
|
||||
s.append(' set(CMAKE_BUILD_TYPE "Debug")')
|
||||
s.append('endif()')
|
||||
|
||||
s.append('\n# directories which hold included cmake modules')
|
||||
if len(modules) > 0:
|
||||
s.append('\n# directories which hold included cmake modules')
|
||||
for directory in set([module.path for module in modules]):
|
||||
rel_cmake_module_path = os.path.join(relative_path, directory)
|
||||
# on windows cmake corrects this so we have to make it wrong again
|
||||
rel_cmake_module_path = rel_cmake_module_path.replace('\\', '/')
|
||||
s.append('set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/%s)' % rel_cmake_module_path)
|
||||
|
||||
s.append('\n# included cmake modules')
|
||||
if len(modules) > 0:
|
||||
s.append('\n# included cmake modules')
|
||||
for module in modules:
|
||||
s.append('include(%s)' % os.path.splitext(module.name)[0])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user