-
-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update all CMakeLists.txt, *.cmake and .travis.yml by eagleivg, a1bat…
…ross, Zegeri and q4a
- Loading branch information
Showing
36 changed files
with
5,119 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,84 @@ | ||
language: cpp | ||
cache: ccache | ||
# Based on https://github.com/ldionne/hana/blob/master/.travis.yml | ||
dist: xenial | ||
sudo: required | ||
dist: trusty | ||
compiler: | ||
- g++ | ||
install: export CXX="g++-7" | ||
cache: ccache | ||
language: cpp | ||
|
||
#branches: | ||
# only: | ||
# - linux | ||
# - xd_dev | ||
# - "/^v\\d+\\./" | ||
|
||
os: | ||
- linux | ||
|
||
matrix: | ||
include: | ||
- env: C_COMPILER=gcc-7 CXX_COMPILER=g++-7 TARGET_CPU=x64 BUILD_CONFIGURATION=Release | ||
addons: &gcc7 | ||
apt: | ||
sources: | ||
- sourceline: 'ppa:ubuntu-toolchain-r/test' | ||
packages: | ||
- g++-7 | ||
|
||
- env: C_COMPILER=gcc-7 CXX_COMPILER=g++-7 TARGET_CPU=x86 BUILD_CONFIGURATION=Release | ||
addons: *gcc7 | ||
|
||
- env: C_COMPILER=gcc-7 CXX_COMPILER=g++-7 TARGET_CPU=x64 BUILD_CONFIGURATION=Debug | ||
addons: *gcc7 | ||
|
||
- env: C_COMPILER=gcc-7 CXX_COMPILER=g++-7 TARGET_CPU=x86 BUILD_CONFIGURATION=Debug | ||
addons: *gcc7 | ||
|
||
# - env: C_COMPILER=clang-5.0 CXX_COMPILER=clang++-5.0 TARGET_CPU=x64 BUILD_CONFIGURATION=Release | ||
# addons: &clang50 | ||
# apt: | ||
# sources: | ||
# - llvm-toolchain-trusty-5.0 | ||
# packages: | ||
# - clang-5.0 | ||
|
||
# - env: C_COMPILER=clang-5.0 CXX_COMPILER=clang++-5.0 TARGET_CPU=x84 BUILD_CONFIGURATION=Release | ||
# addons: *clang50 | ||
|
||
# - env: C_COMPILER=clang-6.0 CXX_COMPILER=clang++-6.0 TARGET_CPU=x64 BUILD_CONFIGURATION=Release | ||
# addons: &clang60 | ||
# apt: | ||
# sources: | ||
# - llvm-toolchain-trusty-6.0 | ||
# packages: | ||
# - clang-6.0 | ||
|
||
# - env: C_COMPILER=clang-6.0 CXX_COMPILER=clang++-6.0 TARGET_CPU=x84 BUILD_CONFIGURATION=Release | ||
# addons: *clang60 | ||
|
||
|
||
install: | ||
- export CC=${C_COMPILER} | ||
- export CXX=${CXX_COMPILER} | ||
- ${CXX} --version | ||
|
||
before_script: | ||
- g++ --version | ||
- sudo apt-get install libegl1-mesa-dev libgles2-mesa-dev libpugixml-dev libopenal-dev libtbb-dev libcrypto++-dev liblockfile-dev libfreeimage-dev | ||
- sudo apt-get install cmake lua5.1-dev libssl-dev libogg-dev libtheora-dev libvorbis-dev libsdl2-dev liblzo2-dev libjpeg-dev libncurses5-dev | ||
- export core_count=$(nproc || echo 4) && echo core_count = $core_count | ||
- mkdir bin | ||
- cd bin | ||
- cmake .. | ||
- if [ $TARGET_CPU == x64 ]; then | ||
sudo apt-get install -y libglew-dev libegl1-mesa-dev libgles2-mesa-dev libpugixml-dev libopenal-dev libtbb-dev libcrypto++-dev liblockfile-dev libfreeimage-dev; | ||
sudo apt-get install -y cmake liblua5.1-0-dev libssl-dev libogg-dev libtheora-dev libvorbis-dev libsdl2-dev liblzo2-dev libjpeg-dev libncurses5-dev; | ||
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_CONFIGURATION; | ||
fi | ||
|
||
- if [ $TARGET_CPU == x86 ]; then | ||
sudo dpkg --add-architecture i386 && sudo apt-get -qq update && sudo apt-get install -y gcc-multilib g++-7-multilib libpulse-dev:i386 libglib2.0-dev:i386; | ||
sudo apt-get install -y libglew-dev:i386 libegl1-mesa-dev:i386 libgles2-mesa-dev:i386 libpugixml-dev:i386 libopenal-dev:i386 libtbb-dev:i386 libcrypto++-dev:i386 liblockfile-dev:i386 libfreeimage-dev:i386; | ||
sudo apt-get install -y cmake liblua5.1-0-dev:i386 libssl-dev:i386 libogg-dev:i386 libtheora-dev:i386 libvorbis-dev:i386 libsdl2-dev:i386 liblzo2-dev:i386 libjpeg-dev:i386 libncurses5-dev:i386; | ||
CFLAGS="-m32 -march=native" CXXFLAGS="-m32 -march=native" cmake .. -DCMAKE_BUILD_TYPE=$BUILD_CONFIGURATION -DCMAKE_ASM_FLAGS=-m32; | ||
fi | ||
|
||
script: | ||
- if [ $TRAVIS_OS_NAME == linux ]; then make && file src/xrCore/xrCore.so; fi | ||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- g++-7 | ||
- if [ $TRAVIS_OS_NAME == linux ]; then make -j $core_count && file src/xrCore/xrCore.so; fi | ||
|
||
notifications: | ||
email: false | ||
env: | ||
global: | ||
- LANG="en_US.UTF-8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
project(OPCODE) | ||
add_dir ( | ||
"." | ||
) | ||
"." | ||
) | ||
|
||
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) | ||
|
||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src ${CMAKE_CURRENT_SOURCE_DIR}/../../sdk/include) | ||
include_directories( | ||
${CMAKE_CURRENT_SOURCE_DIR}/../../src | ||
${CMAKE_CURRENT_SOURCE_DIR}/../../sdk/include | ||
${SDL_INCLUDE_DIRS} | ||
) | ||
|
||
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}__SOURCES} ${${PROJECT_NAME}__INCLUDES}) | ||
|
||
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") | ||
target_link_libraries(${PROJECT_NAME} xrCore) | ||
xr_install(${PROJECT_NAME}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#https://github.com/castano/nvidia-texture-tools/blob/48f5dd4603c9f8ce8d47e8547b8b3c1c71d27da7/cmake/FindFreeImage.cmake | ||
# | ||
# Try to find the FreeImage library and include path. | ||
# Once done this will define | ||
# | ||
# FREEIMAGE_FOUND | ||
# FREEIMAGE_INCLUDE_PATH | ||
# FREEIMAGE_LIBRARY | ||
# | ||
|
||
IF (WIN32) | ||
FIND_PATH( FREEIMAGE_INCLUDE_PATH FreeImage.h | ||
${FREEIMAGE_ROOT_DIR}/include | ||
${FREEIMAGE_ROOT_DIR} | ||
DOC "The directory where FreeImage.h resides") | ||
FIND_LIBRARY( FREEIMAGE_LIBRARY | ||
NAMES FreeImage freeimage | ||
PATHS | ||
${FREEIMAGE_ROOT_DIR}/lib | ||
${FREEIMAGE_ROOT_DIR} | ||
DOC "The FreeImage library") | ||
ELSE (WIN32) | ||
FIND_PATH( FREEIMAGE_INCLUDE_PATH FreeImage.h | ||
/usr/include | ||
/usr/local/include | ||
/sw/include | ||
/opt/local/include | ||
DOC "The directory where FreeImage.h resides") | ||
FIND_LIBRARY( FREEIMAGE_LIBRARY | ||
NAMES FreeImage freeimage | ||
PATHS | ||
/usr/lib64 | ||
/usr/lib | ||
/usr/local/lib64 | ||
/usr/local/lib | ||
/sw/lib | ||
/opt/local/lib | ||
DOC "The FreeImage library") | ||
ENDIF (WIN32) | ||
|
||
SET(FREEIMAGE_LIBRARIES ${FREEIMAGE_LIBRARY}) | ||
|
||
IF (FREEIMAGE_INCLUDE_PATH AND FREEIMAGE_LIBRARY) | ||
SET( FREEIMAGE_FOUND TRUE CACHE BOOL "Set to TRUE if FreeImage is found, FALSE otherwise") | ||
MESSAGE(STATUS "Found FreeImage: ${FREEIMAGE_INCLUDE_PATH}, ${FREEIMAGE_LIBRARY}") | ||
ELSE (FREEIMAGE_INCLUDE_PATH AND FREEIMAGE_LIBRARY) | ||
SET( FREEIMAGE_FOUND FALSE CACHE BOOL "Set to TRUE if FreeImage is found, FALSE otherwise") | ||
MESSAGE(FATAL_ERROR "FreeImage not found.") | ||
ENDIF (FREEIMAGE_INCLUDE_PATH AND FREEIMAGE_LIBRARY) | ||
|
||
MARK_AS_ADVANCED( | ||
FREEIMAGE_FOUND | ||
FREEIMAGE_LIBRARY | ||
FREEIMAGE_LIBRARIES | ||
FREEIMAGE_INCLUDE_PATH) | ||
|
Oops, something went wrong.