diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d67374..8b525a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,8 +17,18 @@ project(node-iohook) if(WIN32 OR WIN64) #add libuihook project - add_subdirectory(libuiohook ${CMAKE_CURRENT_SOURCE_DIR}/build/libuiohook) - + set(_config_headers "${CMAKE_CURRENT_SOURCE_DIR}/libuiohook/include/config.h") + file(GLOB SOURCE_UIHOOK_FILES "${CMAKE_CURRENT_SOURCE_DIR}/libuiohook/include/uiohook.h" + "${CMAKE_CURRENT_SOURCE_DIR}/libuiohook/src/logger.c" + "${CMAKE_CURRENT_SOURCE_DIR}/libuiohook/src/logger.h" + "${CMAKE_CURRENT_SOURCE_DIR}/src/windows/input_helper.h" + "${CMAKE_CURRENT_SOURCE_DIR}/src/windows/input_helper.c" + "${CMAKE_CURRENT_SOURCE_DIR}/src/windows/input_hook.c" + "${CMAKE_CURRENT_SOURCE_DIR}/src/windows/post_event.c" + "${CMAKE_CURRENT_SOURCE_DIR}/src/windows/system_properties.c") + add_library( "uiohook" STATIC ${SOURCE_UIHOOK_FILES} ) + set_target_properties("uiohook" PROPERTIES COMPILE_FLAGS "-Dinline=__inline -D_CRT_SECURE_NO_WARNINGS") + target_include_directories("uiohook" PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/libuiohook/include" "${CMAKE_CURRENT_SOURCE_DIR}/libuiohook/src" "${CMAKE_CURRENT_SOURCE_DIR}/libuiohook/windows") elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") #bootstrap and configure diff --git a/appveyor.yml b/appveyor.yml index 95ecf6e..e56eaa3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,32 +1,25 @@ -# http://www.appveyor.com/docs/appveyor-yml +os: Visual Studio 2015 +version: "{build}" +build: off +skip_tags: true -# Test against these versions of Io.js and Node.js. environment: - os: Visual Studio 2013 matrix: - # node.js - - nodejs_version: "6" -os: Previous Visual Studio 2013 + - nodejs_version: "7" + +platform: + - x86 + - x64 -# Install scripts. (runs after repo cloning) install: + - ps: Install-Product node $env:nodejs_version $env:platform + - npm -g i npm@latest + - set PATH=%APPDATA%\npm;%APPVEYOR_BUILD_FOLDER%\node_modules\.bin;%PATH% - set PATH=C:\Program Files (x86)\MSBuild\12.0\Bin;%PATH% - # Get the latest stable version of Node 0.STABLE.latest - - git submodule update --init - - ps: Install-Product node $env:nodejs_version - - npm -g install npm - # Typical npm stuff. - - npm install - -# Post-install test scripts. -test_script: - # Output useful info for debugging. - - node --version - - npm --version - - npm test - -# Don't actually build. -build: off + - npm i --ignore-scripts + - for /f %%i in ('node -v') do set exact_nodejs_version=%%i + - git submodule update --init --recursive + - cmake-js.cmd compile -# Set build version format here instead of in the admin panel. -version: "{build}" \ No newline at end of file +on_success: + - for %%i in (prebuilds\*) do appveyor PushArtifact %%i