aboutsummaryrefslogblamecommitdiffstats
path: root/examples/CMakeLists.txt
blob: 0c3d9bd34ac5f1760df14f2ae8da9f0efc239703 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11



                                   
                                    
                                                  




                                                    





                                                                                              

                                             
                                         
                                                       
                                           




                                                                                                  


                                                                 
cmake_minimum_required(VERSION 2.8)
project (crow_examples)
 
add_executable(example example.cpp)
#target_link_libraries(example crow)
target_link_libraries(example ${Boost_LIBRARIES} )

if (Tcmalloc_FOUND)
target_link_libraries(example ${Tcmalloc_LIBRARIES})
endif(Tcmalloc_FOUND)

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)

add_executable(example_chat example_chat.cpp)
#target_link_libraries(example_chat crow)
target_link_libraries(example_chat ${Boost_LIBRARIES} )
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)

SET( CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -g -pg" )
SET( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -g -pg" )