MapLinearizabilityTest now uses SimpleRelaxed map by default
[junction.git] / samples / AddSample.cmake
1 #---------------------------------------------------------------------------
2 # This script is included from the CMakeLists.txt (listfile) of sample applications.
3 #---------------------------------------------------------------------------
4
5 # Were we included from the root listfile?
6 if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
7     # Yes, it's the root.
8     get_filename_component(outerPath "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE)
9     set(TURF_ROOT "${outerPath}/turf" CACHE STRING "Path to Turf")
10     include("${TURF_ROOT}/cmake/Macros.cmake")
11     ApplyTurfBuildSettings()
12     add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/.." junction)
13 endif()
14
15 # Define executable target.
16 set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.mycompany.\${PRODUCT_NAME:identifier}")
17 SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
18 GetFilesWithSourceGroups(GLOB SAMPLE_FILES ${CMAKE_CURRENT_SOURCE_DIR} *)
19 add_executable(${SAMPLE_NAME} MACOSX_BUNDLE ${SAMPLE_FILES})
20 set_target_properties(${SAMPLE_NAME} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer")
21 set_target_properties(${SAMPLE_NAME} PROPERTIES FOLDER samples)
22 install(TARGETS ${SAMPLE_NAME} DESTINATION bin)
23
24 # Set include dirs and libraries
25 include_directories(${JUNCTION_ALL_INCLUDE_DIRS})
26 target_link_libraries(${SAMPLE_NAME} ${JUNCTION_ALL_LIBRARIES})
27 AddDLLCopyStep(${SAMPLE_NAME} ${JUNCTION_ALL_DLLS})