]> Creatis software - bbtk.git/blob - samples/SampleOutputObserver/CMakeLists.txt
0a9e19ac0e85a84ad1389e6b30f4d91f9eebdb40
[bbtk.git] / samples / SampleOutputObserver / CMakeLists.txt
1 # Find the bbtk package wx 
2 # The package is called 'bbwx'
3 # It itself finds bbtk and automatically exports its dependency on it
4
5 # Set 'FIND_PACKAGE_VERBOSE' to have information on the packages found
6 SET(FIND_PACKAGE_VERBOSE 1)
7 # Find 
8 FIND_PACKAGE(bbwx)
9 # Use if found
10 IF(bbwx_FOUND)
11 INCLUDE(${bbwx_USE_FILE})
12 ENDIF(bbwx_FOUND)
13
14 SET(SAMPLE bbtkSampleOutputObserver)
15
16 SET(USE_WXWIDGETS ON)
17 CREA_FIND_AND_USE_LIBRARIES()
18
19 # main 
20 IF(WIN32)
21   ADD_EXECUTABLE(${SAMPLE} WIN32 ${SAMPLE})
22   SET_TARGET_PROPERTIES(${SAMPLE} PROPERTIES LINK_FLAGS /subsystem:console )
23 ELSE(WIN32)
24   ADD_EXECUTABLE(${SAMPLE} MACOSX_BUNDLE ${SAMPLE})
25 ENDIF(WIN32)
26
27
28 # Link against bbwx
29 TARGET_LINK_LIBRARIES(${SAMPLE} ${bbwx_LIBRARIES} ${BBTK_LIBRARIES} ${WXWIDGETS_LIBRARIES})