root/threadman/trunk/CMakeLists.txt

Revision 688, 0.6 kB (checked in by tapted, 2 years ago)

Add a cmake optimise option and reduce the risk of a deadlock, holding a lock when waiting

  • Property svn:eol-style set to native
Line 
1CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
2project(threadman)
3
4OPTION(optimise "Build with optimisations in vanilla make" OFF)
5if (optimise)
6  SET(CMAKE_BUILD_TYPE Release)
7else(optimise)
8  SET(CMAKE_BUILD_TYPE Debug)
9endif(optimise)
10
11ENABLE_TESTING()
12add_subdirectory(tests)
13
14FIND_PACKAGE(SDL)
15
16INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR})
17
18add_library(threadman SHARED threadman.h threadman.cpp)
19target_link_libraries(threadman ${SDL_LIBRARY})
20SET_TARGET_PROPERTIES(threadman PROPERTIES LINK_FLAGS -Wl,-no-undefined)
21
22INSTALL(FILES semwaiter.h threadman.h DESTINATION include)
23INSTALL(TARGETS threadman
24        LIBRARY DESTINATION lib
25        RUNTIME DESTINATION bin)
Note: See TracBrowser for help on using the browser.