add default paths and add src/ subdir

This commit is contained in:
Radovan Bast 2015-05-30 20:12:42 +02:00
parent 67142b7a8b
commit ec90c0ce38

View File

@ -182,6 +182,11 @@ def gen_cmakelists(config, relative_path, list_of_modules):
s.append('# places during configuration and build')
s.append('find_package(PythonInterp REQUIRED)')
s.append('\n')
s.append('# default paths')
s.append('set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)')
s.append('set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)')
s.append('\n')
s.append('# determine program version from file, example: "14.1"')
s.append('# the reason why this information is stored')
@ -208,6 +213,9 @@ def gen_cmakelists(config, relative_path, list_of_modules):
for m in list_of_modules:
s.append('include(%s)' % os.path.splitext(m)[0])
s.append('\n')
s.append('add_subdirectory(${PROJECT_SOURCE_DIR}/src)')
return s