Skip to content

Commit

Permalink
Merge pull request #5 from galou/out_of_source_config
Browse files Browse the repository at this point in the history
Configure in build space
  • Loading branch information
AndreaCensi committed Mar 17, 2016
2 parents f959dbc + 967d8d3 commit 80f15ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions sm/CMakeLists.txt
Expand Up @@ -3,6 +3,7 @@ PROJECT (CSM C CXX)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/lib)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})

cmake_minimum_required(VERSION 2.4)
set(csm_link_flags "-L.")
Expand Down
3 changes: 2 additions & 1 deletion sm/lib/json-c/CMakeLists.txt
Expand Up @@ -24,6 +24,7 @@ TARGET_LINK_LIBRARIES(test2 json-c)


FILE(GLOB json_headers "*.h")
SET(json_headers ${json_headers} ${CMAKE_BINARY_DIR}/config.h)
INSTALL(FILES ${json_headers} DESTINATION include/json-c)


Expand Down Expand Up @@ -78,4 +79,4 @@ MY_CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF)
MY_CHECK_FUNCTION_EXISTS(vsnprintf HAVE_VSNPRINTF)
MY_CHECK_FUNCTION_EXISTS(vsyslog HAVE_VSYSLOG)

CONFIGURE_FILE(config.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/config.h)
CONFIGURE_FILE(config.h.cmake ${CMAKE_BINARY_DIR}/config.h)

0 comments on commit 80f15ff

Please sign in to comment.