diff options
author | Florin Dinu <contact@florindinu.ro> | 2015-11-18 09:46:14 +0200 |
---|---|---|
committer | Florin Dinu <contact@florindinu.ro> | 2015-11-18 09:46:14 +0200 |
commit | f6239a0f167a70a83fe83b90ad47636a789a1934 (patch) | |
tree | eef09673740c68e8b8508465d7e4845dd5c1fddc | |
parent | 450b88983f616b1e41bf0a53d38046b0041ec41f (diff) |
Fix running the generator during build on Visual Studio.
On Windows, when using Visual Studio, there is an additional "Debug" or "Release" directory under the
`<project_name>`_BINARY_DIR path so running the generator would sometimes fail.
In later versions of CMake, we can pass the executable target's name directly to `add_custom_command`
and it will use the correct path.
-rw-r--r-- | shibokenmodule/CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shibokenmodule/CMakeLists.txt b/shibokenmodule/CMakeLists.txt index c4d2a16..639cd9a 100644 --- a/shibokenmodule/CMakeLists.txt +++ b/shibokenmodule/CMakeLists.txt @@ -9,7 +9,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/shiboken/shiboken_module_wrapper.cpp ) add_custom_command(OUTPUT ${sample_SRC} -COMMAND ${shibokengenerator_BINARY_DIR}/shiboken2 --project-file=${CMAKE_CURRENT_BINARY_DIR}/shibokenmodule.txt ${GENERATOR_EXTRA_FLAGS} +COMMAND shiboken2 --project-file=${CMAKE_CURRENT_BINARY_DIR}/shibokenmodule.txt ${GENERATOR_EXTRA_FLAGS} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Running generator for 'shiboken2'..." ) |