diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8831600..79e3ef6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,5 @@ add_subdirectory(core) +add_subdirectory(compiler) add_subdirectory(compression) add_subdirectory(database) add_subdirectory(network) diff --git a/src/compiler/CMakeLists.txt b/src/compiler/CMakeLists.txt new file mode 100644 index 0000000..c8f4bed --- /dev/null +++ b/src/compiler/CMakeLists.txt @@ -0,0 +1,18 @@ +list(APPEND compiler_HEADERS + Lexer.h + ) + +list(APPEND compiler_LIB_INCLUDES + Lexer.cpp + ) + +add_library(compiler SHARED ${compiler_LIB_INCLUDES} ${compiler_HEADERS}) + +target_include_directories(compiler PUBLIC + "${CMAKE_CURRENT_SOURCE_DIR}" + ) +set_target_properties( compiler PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON ) + +target_link_libraries( compiler PUBLIC core) + +set_property(TARGET compiler PROPERTY FOLDER src) \ No newline at end of file diff --git a/src/compiler/Lexer.cpp b/src/compiler/Lexer.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/compiler/Lexer.h b/src/compiler/Lexer.h new file mode 100644 index 0000000..e69de29 diff --git a/src/image/CMakeLists.txt b/src/image/CMakeLists.txt index e886c12..aaf7b16 100644 --- a/src/image/CMakeLists.txt +++ b/src/image/CMakeLists.txt @@ -13,6 +13,7 @@ list(APPEND image_LIB_INCLUDES ) list(APPEND image_LIBS core) +list(APPEND image_DEFINES "") find_package(PNG QUIET) if(PNG_FOUND) @@ -20,12 +21,14 @@ list(APPEND image_LIBS PNG::PNG) list(APPEND image_LIB_INCLUDES PngWriterLibPng.cpp ) -target_compile_definitions(image PRIVATE HAS_LIBPNG) +list(APPEND image_DEFINES HAS_LIBPNG) else() message(STATUS "LIBRARY CHECK: libPNG not found - disabling libPNG based image i/o.") endif() + add_library(image SHARED ${image_LIB_INCLUDES} ${image_HEADERS}) +#target_compile_definitions(image PRIVATE ${image_DEFINES}) target_include_directories(image PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}" diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a49d2f3..5d60950 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -11,6 +11,7 @@ list(APPEND TestFiles audio/TestAudioWriter.cpp audio/TestMidiReader.cpp core/TestBinaryStream.cpp + compiler/TestLexer.cpp compression/TestStreamCompressor.cpp database/TestDatabase.cpp fonts/TestFontReader.cpp @@ -25,8 +26,8 @@ list(APPEND TestFiles video/TestVideoDecoder.cpp windows/TestWaylandWindow.cpp web/TestMarkdownParser.cpp - web/TestXmlParser.cpp web/TestSvgWriter.cpp) + web/TestXmlParser.cpp) find_package(PkgConfig) pkg_check_modules(DBUS dbus-1) @@ -38,6 +39,7 @@ foreach(TestFile ${TestFiles}) cmake_path(GET TestFileName STEM TestName) add_executable(${TestName} ${TestFile}) + target_link_libraries(${TestName} PUBLIC core compression fonts network image publishing video database geometry audio graphics web client test_utils ${DBUS_LIBRARIES}) set_property(TARGET ${TestName} PROPERTY FOLDER test) endforeach() diff --git a/test/compiler/TestLexer.cpp b/test/compiler/TestLexer.cpp new file mode 100644 index 0000000..22ca09c --- /dev/null +++ b/test/compiler/TestLexer.cpp @@ -0,0 +1,5 @@ + +int main(int argc, char** argv) +{ + return 0; +}