1
1
cmake_minimum_required (VERSION 2.8.4 )
2
2
project (XInputSimulator )
3
3
4
- set (SOURCE_FILES
5
- main.cpp
6
- notimplementedexception.cpp
7
- notimplementedexception.h
8
- xinputsimulator.cpp
9
- xinputsimulator.h
10
- xinputsimulatorimpl.cpp
11
- xinputsimulatorimpl.h
12
- xinputsimulatorimpllinux.cpp
13
- xinputsimulatorimpllinux.h
14
- xinputsimulatorimplmacos.cpp
15
- xinputsimulatorimplmacos.h
16
- xinputsimulatorimplwin.cpp
17
- xinputsimulatorimplwin.h )
18
-
19
4
# Linux
20
5
if (UNIX AND NOT APPLE )
21
6
find_library (X_11 X11 )
22
7
find_library (X_TST Xtst )
23
8
set (EXTRA_LIBS ${X_11} ${X_TST} )
24
9
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
10
+ set (PLATFORM_SOURCE_FILES xinputsimulatorimpllinux.cpp xinputsimulatorimpllinux.h )
25
11
endif (UNIX AND NOT APPLE )
26
12
27
13
# Apple
@@ -31,13 +17,25 @@ set(SOURCE_FILES
31
17
find_library (CORE_FOUNDATION CoreFoundation )
32
18
set (EXTRA_LIBS ${APP_SERVICES_LIBRARY} ${CARBON} ${CORE_FOUNDATION} )
33
19
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
20
+ set (PLATFORM_SOURCE_FILES xinputsimulatorimplmacos.cpp xinputsimulatorimplmacos.h )
34
21
endif (APPLE )
35
22
36
23
# Windows
37
24
if (WIN32 )
38
25
#find_library(USER_32 User32.Lib)
39
26
#set(EXTRA_LIBS ${USER_32})
27
+ set (PLATFORM_SOURCE_FILES xinputsimulatorimplwin.cpp xinputsimulatorimplwin.h )
40
28
endif (WIN32 )
29
+
30
+ set (SOURCE_FILES
31
+ main.cpp
32
+ notimplementedexception.cpp
33
+ notimplementedexception.h
34
+ xinputsimulator.cpp
35
+ xinputsimulator.h
36
+ xinputsimulatorimpl.cpp
37
+ xinputsimulatorimpl.h
38
+ ${PLATFORM_SOURCE_FILES} )
41
39
42
40
add_executable (XInputSimulator ${SOURCE_FILES} )
43
41
target_link_libraries (XInputSimulator ${EXTRA_LIBS} )
0 commit comments