mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-05 03:45:59 -04:00
Add mock projects to test correctness of generated pkg-config and cmake modules
This commit is contained in:
parent
adf3786cdc
commit
c5578f8daf
10
exttests/cmake/CMakeLists.txt
Normal file
10
exttests/cmake/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
PROJECT(libSDL2pp)
|
||||||
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||||
|
|
||||||
|
FIND_PACKAGE(SDL2PP REQUIRED)
|
||||||
|
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
|
|
||||||
|
INCLUDE_DIRECTORIES(${SDL2PP_INCLUDE_DIRS})
|
||||||
|
ADD_EXECUTABLE(cmake-ext-test ../../examples/sprites.cc)
|
||||||
|
TARGET_LINK_LIBRARIES(cmake-ext-test ${SDL2PP_LIBRARIES})
|
13
exttests/pkg-config/Makefile
Normal file
13
exttests/pkg-config/Makefile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
CXX?= g++
|
||||||
|
|
||||||
|
CXXFLAGS+= -std=c++11
|
||||||
|
|
||||||
|
SDL2PP_CFLAGS= `pkg-config --cflags sdl2pp`
|
||||||
|
SDL2PP_LIBS= `pkg-config --libs sdl2pp`
|
||||||
|
|
||||||
|
all: make-ext-test
|
||||||
|
|
||||||
|
make-ext-test:
|
||||||
|
@echo "SDL2PP_CFLAGS=${SDL2PP_CFLAGS}"
|
||||||
|
@echo "SDL2PP_LIBS=${SDL2PP_LIBS}"
|
||||||
|
${CXX} ${CXXFLAGS} ../../examples/sprites.cc -o make-ext-test ${SDL2PP_CFLAGS} ${SDL2PP_LIBS}
|
Loading…
x
Reference in New Issue
Block a user