diff options
author | Tomi Valkeinen <tomi.valkeinen@iki.fi> | 2015-10-01 21:44:49 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@iki.fi> | 2015-10-01 21:44:49 +0300 |
commit | 093b77fc295d1bc4694b32fed95da0fab78c4097 (patch) | |
tree | bc9a2430aea3a33604defb00a4e62295c3cf03f2 | |
parent | f1f87468e2cf1cc3e934efb37db902a62f1fc8dc (diff) |
move test utils to libkmstest library
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | libkms++/CMakeLists.txt | 2 | ||||
-rw-r--r-- | libkmstest/CMakeLists.txt | 8 | ||||
-rw-r--r-- | libkmstest/color.cpp (renamed from libkms++/utils/color.cpp) | 0 | ||||
-rw-r--r-- | libkmstest/color.h (renamed from libkms++/utils/color.h) | 0 | ||||
-rw-r--r-- | libkmstest/conv.cpp (renamed from libkms++/utils/conv.cpp) | 0 | ||||
-rw-r--r-- | libkmstest/conv.h (renamed from libkms++/utils/conv.h) | 0 | ||||
-rw-r--r-- | libkmstest/testpat.cpp (renamed from libkms++/utils/testpat.cpp) | 0 | ||||
-rw-r--r-- | libkmstest/testpat.h (renamed from libkms++/utils/testpat.h) | 0 | ||||
-rw-r--r-- | lua/CMakeLists.txt | 7 | ||||
-rw-r--r-- | lua/luakms.i | 7 | ||||
-rw-r--r-- | py/CMakeLists.txt | 7 | ||||
-rw-r--r-- | py/pykms.i | 7 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 4 | ||||
-rw-r--r-- | tests/db.cpp | 2 | ||||
-rw-r--r-- | tests/testpat.cpp | 2 |
16 files changed, 30 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a20996..559ba13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ pkg_check_modules(LIBDRM libdrm REQUIRED) enable_testing() add_subdirectory(libkms++) +add_subdirectory(libkmstest) add_subdirectory(tests) if(LIBKMS_ENABLE_PYTHON) diff --git a/libkms++/CMakeLists.txt b/libkms++/CMakeLists.txt index e8d14f7..c874778 100644 --- a/libkms++/CMakeLists.txt +++ b/libkms++/CMakeLists.txt @@ -1,7 +1,7 @@ include_directories(${LIBDRM_INCLUDE_DIRS}) link_directories(${LIBDRM_LIBRARY_DIRS}) -file(GLOB SRCS "*.cpp" "*.h" "utils/*.cpp" "utils/*.h") +file(GLOB SRCS "*.cpp" "*.h") add_library(kms++ ${SRCS}) target_include_directories(kms++ PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/libkmstest/CMakeLists.txt b/libkmstest/CMakeLists.txt new file mode 100644 index 0000000..55d31ae --- /dev/null +++ b/libkmstest/CMakeLists.txt @@ -0,0 +1,8 @@ +include_directories(${LIBDRM_INCLUDE_DIRS}) +link_directories(${LIBDRM_LIBRARY_DIRS}) + +file(GLOB SRCS "*.cpp" "*.h") +add_library(kmstest ${SRCS}) + +target_link_libraries(kmstest kms++ ${LIBDRM_LIBRARIES}) +target_include_directories(kmstest PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/libkms++/utils/color.cpp b/libkmstest/color.cpp index b5b9001..b5b9001 100644 --- a/libkms++/utils/color.cpp +++ b/libkmstest/color.cpp diff --git a/libkms++/utils/color.h b/libkmstest/color.h index 1db47e8..1db47e8 100644 --- a/libkms++/utils/color.h +++ b/libkmstest/color.h diff --git a/libkms++/utils/conv.cpp b/libkmstest/conv.cpp index d439253..d439253 100644 --- a/libkms++/utils/conv.cpp +++ b/libkmstest/conv.cpp diff --git a/libkms++/utils/conv.h b/libkmstest/conv.h index d1b306a..d1b306a 100644 --- a/libkms++/utils/conv.h +++ b/libkmstest/conv.h diff --git a/libkms++/utils/testpat.cpp b/libkmstest/testpat.cpp index 56000f1..56000f1 100644 --- a/libkms++/utils/testpat.cpp +++ b/libkmstest/testpat.cpp diff --git a/libkms++/utils/testpat.h b/libkmstest/testpat.h index b60271a..b60271a 100644 --- a/libkms++/utils/testpat.h +++ b/libkmstest/testpat.h diff --git a/lua/CMakeLists.txt b/lua/CMakeLists.txt index ba70561..584648d 100644 --- a/lua/CMakeLists.txt +++ b/lua/CMakeLists.txt @@ -9,12 +9,11 @@ pkg_search_module(LUA REQUIRED lua5.2 lua) include_directories(${LUA_INCLUDE_DIRS}) link_directories(${LUA_LIBRARY_DIRS}) -#include_directories(libkms) -#XXX -include_directories(../libkms++) +# XXX how to add these inc dirs in a proper way? +include_directories(../libkms++ ../libkmstest) set_source_files_properties(luakms.i PROPERTIES CPLUSPLUS ON) swig_add_module(luakms lua luakms.i) -swig_link_libraries(luakms kms++ ${LIBDRM_LIBRARIES} ${LUA_LIBRARIES}) +swig_link_libraries(luakms kms++ kmstest ${LIBDRM_LIBRARIES} ${LUA_LIBRARIES}) add_custom_target(luaextras SOURCES test.lua) diff --git a/lua/luakms.i b/lua/luakms.i index 2920c46..0b87857 100644 --- a/lua/luakms.i +++ b/lua/luakms.i @@ -1,7 +1,9 @@ %module libluakms %{ #include "kms++.h" -#include "utils/testpat.h" + +#include "testpat.h" + using namespace kms; %} @@ -18,4 +20,5 @@ using namespace kms; %include "plane.h" %include "connector.h" %include "encoder.h" -%include "utils/testpat.h" + +%include "testpat.h" diff --git a/py/CMakeLists.txt b/py/CMakeLists.txt index 39e6ec6..8ad476b 100644 --- a/py/CMakeLists.txt +++ b/py/CMakeLists.txt @@ -8,15 +8,14 @@ link_directories(${LIBDRM_LIBRARY_DIRS}) pkg_check_modules(PYTHON python-3.4 REQUIRED) include_directories(${PYTHON_INCLUDE_DIRS}) -#include_directories(libkms) -#XXX -include_directories(../libkms++) +# XXX how to add these inc dirs in a proper way? +include_directories(../libkms++ ../libkmstest) #set(CMAKE_SWIG_FLAGS "-I../../libkms") set_source_files_properties(pykms.i PROPERTIES CPLUSPLUS ON) swig_add_module(pykms python pykms.i) -swig_link_libraries(pykms kms++ ${LIBDRM_LIBRARIES} ${PYTHON_LIBRARIES}) +swig_link_libraries(pykms kms++ kmstest ${LIBDRM_LIBRARIES} ${PYTHON_LIBRARIES}) add_custom_target(pyextras SOURCES test.py functest.py) @@ -1,7 +1,9 @@ %module pykms %{ #include "kms++.h" -#include "utils/testpat.h" + +#include "testpat.h" + using namespace kms; %} @@ -18,4 +20,5 @@ using namespace kms; %include "plane.h" %include "connector.h" %include "encoder.h" -%include "utils/testpat.h" + +%include "testpat.h" diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7856034..a309bda 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2,8 +2,8 @@ include_directories(${LIBDRM_INCLUDE_DIRS}) link_directories(${LIBDRM_LIBRARY_DIRS}) add_executable (db db.cpp) -target_link_libraries(db kms++ ${LIBDRM_LIBRARIES}) +target_link_libraries(db kms++ kmstest ${LIBDRM_LIBRARIES}) add_executable (testpat testpat.cpp) -target_link_libraries(testpat kms++ ${LIBDRM_LIBRARIES}) +target_link_libraries(testpat kms++ kmstest ${LIBDRM_LIBRARIES}) diff --git a/tests/db.cpp b/tests/db.cpp index bfefcb8..9b7c973 100644 --- a/tests/db.cpp +++ b/tests/db.cpp @@ -6,7 +6,7 @@ #include <drm_fourcc.h> #include "kms++.h" -#include "utils/color.h" +#include "color.h" #include "test.h" diff --git a/tests/testpat.cpp b/tests/testpat.cpp index 9980407..419df5d 100644 --- a/tests/testpat.cpp +++ b/tests/testpat.cpp @@ -2,7 +2,7 @@ #include <algorithm> #include "kms++.h" -#include "utils/testpat.h" +#include "testpat.h" #include "test.h" |