11cmake_minimum_required (VERSION 2.8.4)
22project (XInputSimulator)
33
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-
194 # Linux
205 if (UNIX AND NOT APPLE )
216 find_library (X_11 X11)
227 find_library (X_TST Xtst)
238 set (EXTRA_LIBS ${X_11} ${X_TST} )
249 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
10+ set (PLATFORM_SOURCE_FILES xinputsimulatorimpllinux.cpp xinputsimulatorimpllinux.h)
2511 endif (UNIX AND NOT APPLE )
2612
2713 # Apple
@@ -31,13 +17,25 @@ set(SOURCE_FILES
3117 find_library (CORE_FOUNDATION CoreFoundation)
3218 set (EXTRA_LIBS ${APP_SERVICES_LIBRARY} ${CARBON} ${CORE_FOUNDATION} )
3319 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
20+ set (PLATFORM_SOURCE_FILES xinputsimulatorimplmacos.cpp xinputsimulatorimplmacos.h)
3421 endif (APPLE )
3522
3623 # Windows
3724 if (WIN32 )
3825 #find_library(USER_32 User32.Lib)
3926 #set(EXTRA_LIBS ${USER_32})
27+ set (PLATFORM_SOURCE_FILES xinputsimulatorimplwin.cpp xinputsimulatorimplwin.h)
4028 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} )
4139
4240add_executable (XInputSimulator ${SOURCE_FILES} )
4341target_link_libraries (XInputSimulator ${EXTRA_LIBS} )
0 commit comments