Initial compiler entry.
This commit is contained in:
parent
a95439d419
commit
be0af2e6a7
7 changed files with 31 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
add_subdirectory(core)
|
add_subdirectory(core)
|
||||||
|
add_subdirectory(compiler)
|
||||||
add_subdirectory(compression)
|
add_subdirectory(compression)
|
||||||
add_subdirectory(database)
|
add_subdirectory(database)
|
||||||
add_subdirectory(network)
|
add_subdirectory(network)
|
||||||
|
|
18
src/compiler/CMakeLists.txt
Normal file
18
src/compiler/CMakeLists.txt
Normal file
|
@ -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)
|
0
src/compiler/Lexer.cpp
Normal file
0
src/compiler/Lexer.cpp
Normal file
0
src/compiler/Lexer.h
Normal file
0
src/compiler/Lexer.h
Normal file
|
@ -13,6 +13,7 @@ list(APPEND image_LIB_INCLUDES
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND image_LIBS core)
|
list(APPEND image_LIBS core)
|
||||||
|
list(APPEND image_DEFINES "")
|
||||||
|
|
||||||
find_package(PNG QUIET)
|
find_package(PNG QUIET)
|
||||||
if(PNG_FOUND)
|
if(PNG_FOUND)
|
||||||
|
@ -20,12 +21,14 @@ list(APPEND image_LIBS PNG::PNG)
|
||||||
list(APPEND image_LIB_INCLUDES
|
list(APPEND image_LIB_INCLUDES
|
||||||
PngWriterLibPng.cpp
|
PngWriterLibPng.cpp
|
||||||
)
|
)
|
||||||
target_compile_definitions(image PRIVATE HAS_LIBPNG)
|
list(APPEND image_DEFINES HAS_LIBPNG)
|
||||||
else()
|
else()
|
||||||
message(STATUS "LIBRARY CHECK: libPNG not found - disabling libPNG based image i/o.")
|
message(STATUS "LIBRARY CHECK: libPNG not found - disabling libPNG based image i/o.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
add_library(image SHARED ${image_LIB_INCLUDES} ${image_HEADERS})
|
add_library(image SHARED ${image_LIB_INCLUDES} ${image_HEADERS})
|
||||||
|
#target_compile_definitions(image PRIVATE ${image_DEFINES})
|
||||||
|
|
||||||
target_include_directories(image PUBLIC
|
target_include_directories(image PUBLIC
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
|
|
@ -11,6 +11,7 @@ list(APPEND TestFiles
|
||||||
audio/TestAudioWriter.cpp
|
audio/TestAudioWriter.cpp
|
||||||
audio/TestMidiReader.cpp
|
audio/TestMidiReader.cpp
|
||||||
core/TestBinaryStream.cpp
|
core/TestBinaryStream.cpp
|
||||||
|
compiler/TestLexer.cpp
|
||||||
compression/TestStreamCompressor.cpp
|
compression/TestStreamCompressor.cpp
|
||||||
database/TestDatabase.cpp
|
database/TestDatabase.cpp
|
||||||
fonts/TestFontReader.cpp
|
fonts/TestFontReader.cpp
|
||||||
|
@ -31,6 +32,7 @@ list(APPEND TestNames
|
||||||
TestAudioWriter
|
TestAudioWriter
|
||||||
TestMidiReader
|
TestMidiReader
|
||||||
TestBinaryStream
|
TestBinaryStream
|
||||||
|
TestLexer
|
||||||
TestStreamCompressor
|
TestStreamCompressor
|
||||||
TestDatabase
|
TestDatabase
|
||||||
TestFontReader
|
TestFontReader
|
||||||
|
@ -54,7 +56,7 @@ link_directories(${DBUS_LIBRARY_DIRS})
|
||||||
|
|
||||||
foreach(TestFile TestName IN ZIP_LISTS TestFiles TestNames)
|
foreach(TestFile TestName IN ZIP_LISTS TestFiles TestNames)
|
||||||
add_executable(${TestName} ${TestFile})
|
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})
|
target_link_libraries(${TestName} PUBLIC core compiler compression fonts network image publishing video database geometry audio graphics web client test_utils ${DBUS_LIBRARIES})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
|
||||||
|
|
5
test/compiler/TestLexer.cpp
Normal file
5
test/compiler/TestLexer.cpp
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in a new issue