Win32 compatibility fixups
[baulk.git] / src / Baulk / Control / CMakeLists.txt
blob5791606ec36c789db0033c44af425e92e8d383e5
1 ###| CMAKE Baulk Control |###
3 #| Project
4 project( BaulkControl )
5 cmake_minimum_required( VERSION 2.6 )
7 #| Sources
8 set( SRCS
9         ./control.cpp
10         ./wrapper_control.cpp
13 #| Headers
14 set( HDRS
15         ./control.h
18 #| Executable
19 set( LIB
20         BaulkControl
23 #| Baulk Common and Server Libraries
24 include_directories(
25         ${PROJECT_SOURCE_DIR}/../../Common
26         ${PROJECT_SOURCE_DIR}/../Server
29 #| Misc Qt4
30 add_definitions( -Wall )
31 find_package( Qt4 REQUIRED )
32 include( ${QT_USE_FILE} )
33 QT4_WRAP_CPP( MOC_SRCS ${HDRS} )
35 ###| Library Versioning
36 set( cat_prog cat )
37 if( WIN32 )
38         set( cat_prog type )
39 endif( WIN32 )
41 exec_program( ${cat_prog} 
42         ARGS ${PROJECT_SOURCE_DIR}/../../Common/VERSION 
43         OUTPUT_VARIABLE VERSION 
45 set( LIBRARY_VERSION
46         "${VERSION}"
49 #| Create the Library
50 add_library( ${LIB} SHARED ${SRCS} ${MOC_SRCS} )
51 set( LIBRARY_OUTPUT_PATH
52         ${PROJECT_BINARY_DIR}/../../../bin/BaulkLibs
54 set_target_properties( ${LIB} PROPERTIES VERSION ${LIBRARY_VERSION} )
56 #| Link Needed Libraries
57 target_link_libraries( ${LIB} 
58         ${QT_LIBRARIES}
59         BaulkWidget     # From Common
60         LibraryLoader   # From Common