Commit f21d3819 authored by Harris Hancock's avatar Harris Hancock Committed by Kenton Varda

Use TARGET_FILE gen. expression to locate capnpc-c++

The previous solution used hard-coded paths which would have had to be
special-cased for multi-configuration generators such as Visual Studio,
which put binaries in individual Debug, Release, etc. directories.
parent f6d085a2
...@@ -163,7 +163,7 @@ if(CAPNP_BUILD_TOOLS) ...@@ -163,7 +163,7 @@ if(CAPNP_BUILD_TOOLS)
#Capnp tool needs capnpc_cpp location. But cmake deprecated LOCATION property. #Capnp tool needs capnpc_cpp location. But cmake deprecated LOCATION property.
#So we use custom property to pass location #So we use custom property to pass location
set_target_properties(capnpc_cpp PROPERTIES CAPNPC_CXX_EXECUTABLE set_target_properties(capnpc_cpp PROPERTIES CAPNPC_CXX_EXECUTABLE
$<JOIN:$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/capnpc-c++>,$<INSTALL_INTERFACE:${CMAKE_INSTALL_BINDIR}/capnpc-c++>> $<TARGET_FILE:capnpc_cpp>
) )
add_executable(capnpc_capnp add_executable(capnpc_capnp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment