Add a quick and dirty cmake build
This commit is contained in:
49
CMakeLists.txt
Normal file
49
CMakeLists.txt
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
# Full-featured Build System Sample
|
||||||
|
# CMake cross-platform build system recipe
|
||||||
|
# 2009 Ryan Pavlik <rpavlik@iastate.edu>
|
||||||
|
# http://academic.cleardefinition.com/
|
||||||
|
# Iowa State University HCI Graduate Program/VRAC
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
# Set package properties
|
||||||
|
project(wiiuse)
|
||||||
|
|
||||||
|
###
|
||||||
|
# Set up options
|
||||||
|
###
|
||||||
|
|
||||||
|
# See the cmake docs about the "option" command if you have build-time configuration,
|
||||||
|
# such as ifdefs, etc.
|
||||||
|
|
||||||
|
###
|
||||||
|
# Perform build configuration of dependencies
|
||||||
|
###
|
||||||
|
|
||||||
|
# Locally-developed modules dist'ed with this app - always have this first.
|
||||||
|
#list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||||
|
#include(UseBackportedModules)
|
||||||
|
|
||||||
|
###
|
||||||
|
# Build the project
|
||||||
|
###
|
||||||
|
|
||||||
|
# The app is in the "src" subdirectory
|
||||||
|
add_subdirectory(src)
|
||||||
|
# Add any more subdirectories to recurse into here.
|
||||||
|
|
||||||
|
###
|
||||||
|
# Other things you might like to do
|
||||||
|
###
|
||||||
|
|
||||||
|
# Add nightly builds/dashboard support
|
||||||
|
#include(CreateDashboardScripts)
|
||||||
|
#create_dashboard_scripts(DashboardBuildInitialCache.cmake.in)
|
||||||
|
|
||||||
|
###
|
||||||
|
# Set packaging options (for CPack)
|
||||||
|
###
|
||||||
|
|
||||||
|
# Include the packaging system now that we have it all set up
|
||||||
|
include(CPack)
|
||||||
|
|
||||||
51
src/CMakeLists.txt
Normal file
51
src/CMakeLists.txt
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
set(SOURCES
|
||||||
|
classic.c
|
||||||
|
dynamics.c
|
||||||
|
events.c
|
||||||
|
guitar_hero_3.c
|
||||||
|
io.c
|
||||||
|
ir.c
|
||||||
|
nunchuk.c
|
||||||
|
wiiuse.c
|
||||||
|
wiiboard.c
|
||||||
|
classic.h
|
||||||
|
definitions.h
|
||||||
|
dynamics.h
|
||||||
|
events.h
|
||||||
|
guitar_hero_3.h
|
||||||
|
io.h
|
||||||
|
ir.h
|
||||||
|
nunchuk.h
|
||||||
|
os.h
|
||||||
|
wiiuse_internal.h
|
||||||
|
wiiboard.h)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
list(APPEND SOURCES io_win.c)
|
||||||
|
else()
|
||||||
|
list(APPEND SOURCES io_nix.c)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(API
|
||||||
|
wiiuse.h)
|
||||||
|
|
||||||
|
add_library(wiiuse SHARED ${SOURCES} ${API})
|
||||||
|
target_link_libraries(wiiuse m bluetooth)
|
||||||
|
|
||||||
|
set_property(TARGET
|
||||||
|
wiiuse
|
||||||
|
PROPERTY
|
||||||
|
PUBLIC_HEADER
|
||||||
|
${API})
|
||||||
|
|
||||||
|
install(TARGETS
|
||||||
|
wiiuse
|
||||||
|
RUNTIME
|
||||||
|
DESTINATION
|
||||||
|
bin
|
||||||
|
LIBRARY
|
||||||
|
DESTINATION
|
||||||
|
lib
|
||||||
|
PUBLIC_HEADER
|
||||||
|
DESTINATION
|
||||||
|
include)
|
||||||
Reference in New Issue
Block a user