2014-08-06 16:18:33 +00:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
project (crow_examples)
|
|
|
|
|
|
|
|
add_executable(example example.cpp)
|
2014-08-06 23:31:27 +00:00
|
|
|
#target_link_libraries(example crow)
|
2014-11-22 02:13:46 +00:00
|
|
|
target_link_libraries(example ${Boost_LIBRARIES})
|
|
|
|
target_link_libraries(example ${CMAKE_THREAD_LIBS_INIT})
|
2014-08-14 23:22:02 +00:00
|
|
|
|
|
|
|
if (Tcmalloc_FOUND)
|
|
|
|
target_link_libraries(example ${Tcmalloc_LIBRARIES})
|
|
|
|
endif(Tcmalloc_FOUND)
|
|
|
|
|
2014-10-23 16:20:19 +00:00
|
|
|
add_executable(example_with_all example_with_all.cpp)
|
|
|
|
#target_link_libraries(example crow)
|
2014-11-22 02:13:46 +00:00
|
|
|
target_link_libraries(example_with_all ${Boost_LIBRARIES})
|
|
|
|
target_link_libraries(example_with_all ${CMAKE_THREAD_LIBS_INIT})
|
2014-10-23 16:20:19 +00:00
|
|
|
|
2014-08-06 19:46:28 +00:00
|
|
|
add_custom_command(OUTPUT example_test.py
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E
|
|
|
|
copy ${PROJECT_SOURCE_DIR}/example_test.py ${CMAKE_CURRENT_BINARY_DIR}/example_test.py
|
|
|
|
DEPENDS ${PROJECT_SOURCE_DIR}/example_test.py
|
|
|
|
)
|
|
|
|
add_custom_target(example_copy ALL DEPENDS example_test.py)
|
2014-08-06 16:18:33 +00:00
|
|
|
|
|
|
|
add_executable(example_chat example_chat.cpp)
|
2014-08-06 23:31:27 +00:00
|
|
|
#target_link_libraries(example_chat crow)
|
2014-11-22 02:13:46 +00:00
|
|
|
target_link_libraries(example_chat ${Boost_LIBRARIES})
|
|
|
|
target_link_libraries(example_chat ${CMAKE_THREAD_LIBS_INIT})
|
2014-08-06 16:18:33 +00:00
|
|
|
add_custom_command(OUTPUT example_chat.html
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E
|
|
|
|
copy ${PROJECT_SOURCE_DIR}/example_chat.html ${CMAKE_CURRENT_BINARY_DIR}/example_chat.html
|
|
|
|
DEPENDS ${PROJECT_SOURCE_DIR}/example_chat.html
|
|
|
|
)
|
|
|
|
add_custom_target(example_chat_copy ALL DEPENDS example_chat.html)
|
2014-08-14 23:22:02 +00:00
|
|
|
|
2014-08-15 01:44:03 +00:00
|
|
|
#SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -pg" )
|
|
|
|
#SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -g -pg" )
|