Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
pinocchio-tutorials
Commits
2b976815
Commit
2b976815
authored
Nov 20, 2017
by
Guilhem Saurel
Browse files
update CMakeLists.txt
parent
8640f962
Changes
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
2b976815
...
...
@@ -3,7 +3,9 @@ PROJECT(pinocchio_tutos)
FIND_PROGRAM
(
ASCIIDOC NAMES asciidoc
)
set
(
ASCIIDOC
${
ASCIIDOC
}
--filter latex -a toc -a icons -o
)
FIND_PROGRAM
(
ZIP NAMES zip
)
#set(ZIP "${ZIP} -j")
MESSAGE
(
STATUS ZIP
"--
${
ZIP
}
--"
)
# --- ASCIIDOC RULES ---------------------------------------------------------------
MACRO
(
ADD_ASCIIDOC_TARGET asciidocfile htmlfile
)
# Create a "CUSTOM_COMMAND" to create the htmlfile from the asciidoc file.
...
...
@@ -126,6 +128,7 @@ foreach(dirname ${dirtargets})
)
endforeach
(
secname
)
# --- Add python files
set
(
pydeps
)
foreach
(
pyname
${${
dirname
}
_pythons
}
)
get_filename_component
(
basename
${
pyname
}
NAME_WE
)
get_filename_component
(
extname
${
pyname
}
EXT
)
...
...
@@ -139,11 +142,20 @@ foreach(dirname ${dirtargets})
DEPENDS
${
CMAKE_SOURCE_DIR
}
/
${${
dirname
}
_dir
}
/
${
pyname
}
COMMENT
"Copy
${
pyname
}
"
)
LIST
(
APPEND dirdeps
${
destpy
}
/
${
dirname
}
/
${
pyname
}
)
LIST
(
APPEND pydeps
${
destpy
}
/
${
dirname
}
/
${
pyname
}
)
asciidoc_from_python_target
(
${
destpy
}
/
${
dirname
}
/
${
pyname
}
${
shortname
}
.asciidoc
)
add_asciidoc_target
(
${
shortname
}
.asciidoc
${
dest
}
/
${
shortname
}
.html
)
LIST
(
APPEND dirdeps
${
dest
}
/
${
shortname
}
.html
)
endforeach
(
pyname
)
# Add rule tpXX_ to compile all the directory.
if
(
${
dirname
}
_pythons
)
add_custom_command
(
OUTPUT
${
dest
}
/
${
dirname
}
.zip
COMMAND
${
ZIP
}
-rj
${
dest
}
/
${
dirname
}
.zip
${
destpy
}
/
${
dirname
}
/
DEPENDS
${
dirdeps
}
COMMENT
"Zip rule for
${
dest
}
/
${
dirname
}
.zip
${
ZIP
}
${
dest
}
/
${
dirname
}
.zip
${
destpy
}
/
${
dirname
}
/"
)
LIST
(
APPEND dirdeps
${
dest
}
/
${
dirname
}
.zip
)
endif
()
add_custom_target
(
${
dirname
}
_ DEPENDS
${
dirdeps
}
)
LIST
(
APPEND alldeps
${
dirname
}
_
)
endforeach
(
dirname
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment