Commit 41c80e9c authored by Ahmed Charles's avatar Ahmed Charles Committed by Joshua Warner

Fix cmake build.

parent c2e48e4d
...@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8) ...@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -std=c++11") set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -std=c++11")
if(EXISTS "${dir}" AND IS_DIRECTORY "${dir}") if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/gtest" AND IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/gtest")
add_subdirectory(gtest) add_subdirectory(gtest)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/gtest/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/gtest/include)
else() else()
...@@ -12,4 +12,4 @@ endif() ...@@ -12,4 +12,4 @@ endif()
include(CTest) include(CTest)
add_subdirectory(src) add_subdirectory(src)
\ No newline at end of file
...@@ -75,11 +75,10 @@ add_executable(capnp-tool ...@@ -75,11 +75,10 @@ add_executable(capnp-tool
) )
target_link_libraries(capnp-tool capnpc capnp kj) target_link_libraries(capnp-tool capnpc capnp kj)
add_executable(capnp-c++ add_executable(capnpc-c++
capnp/compiler/capnpc-c++.c++ capnp/compiler/capnpc-c++.c++
) )
target_link_libraries(capnp-c++ capnp kj) target_link_libraries(capnpc-c++ capnp kj)
get_property(capnp-c++_location TARGET capnp-c++ PROPERTY LOCATION)
set(test_capnp_files set(test_capnp_files
capnp/test.capnp capnp/test.capnp
...@@ -106,11 +105,11 @@ add_custom_command( ...@@ -106,11 +105,11 @@ add_custom_command(
${test_capnp_cpp_files} ${test_capnp_cpp_files}
${test_capnp_header_files} ${test_capnp_header_files}
COMMAND capnp-tool compile COMMAND capnp-tool compile
-o ${capnp-c++_location} -o $<TARGET_FILE:capnpc-c++>
--src-prefix=${CMAKE_CURRENT_SOURCE_DIR} --src-prefix=${CMAKE_CURRENT_SOURCE_DIR}
-I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_CURRENT_SOURCE_DIR}
${test_capnp_capnp_files} ${test_capnp_capnp_files}
DEPENDS capnp-tool capnp-c++ ${test_capnp_files}) DEPENDS capnp-tool capnpc-c++ ${test_capnp_files})
add_library(capnp_test_lib ${test_capnp_cpp_files}) add_library(capnp_test_lib ${test_capnp_cpp_files})
include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR})
......
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