Hide internal classes.

This commit is contained in:
Kolan Sh 2014-07-23 15:08:46 +04:00
parent 005f3cf311
commit 8b8f9b6f15
3 changed files with 17 additions and 16 deletions

View File

@ -12,9 +12,10 @@ INCLUDE (MacroOptionalAddSubdirectory)
INCLUDE (CPackDetectArch)
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w") # supress Gcc warnings
SET (PROJ_LCASE "laview-latex-struct")
# configure a header file for Gettext
SET (GETTEXT_PACKAGE "laview-latex-struct")
SET (GETTEXT_PACKAGE "${PROJ_LCASE}")
ADD_DEFINITIONS (-DGETTEXT_PACKAGE="${GETTEXT_PACKAGE}")
IF (WIN32)
SET (LOCALEDIR "")

View File

@ -10,27 +10,27 @@ FILE (GLOB_RECURSE LAviewSources RELATIVE ${CMAKE_SOURCE_DIR}/src *.vala)
VALA_PRECOMPILE (VALA_C ${LAviewSources}
PACKAGES gee-0.8 posix
OPTIONS --thread ${VALA_DEBUG}
OPTIONS --thread ${VALA_DEBUG} --vapi=${CMAKE_BINARY_DIR}/src/${PROJ_LCASE}-${MAJOR}.vapi
CUSTOM_VAPIS
GENERATE_VAPI laview-latex-struct-${MAJOR}
GENERATE_HEADER laview-latex-struct-${MAJOR}
GENERATE_VAPI ${PROJ_LCASE}-${MAJOR}_internal
GENERATE_HEADER ${PROJ_LCASE}-${MAJOR}
)
INCLUDE_DIRECTORIES ("${CMAKE_BINARY_DIR}")
ADD_LIBRARY (laview-latex-struct SHARED ${VALA_C} ${PROJECT_SOURCE_DIR}/src/vala_unsupported.c)
TARGET_LINK_LIBRARIES (laview-latex-struct ${GEE_LIBRARIES})
SET_TARGET_PROPERTIES (laview-latex-struct PROPERTIES VERSION ${VERSION})
SET_TARGET_PROPERTIES (laview-latex-struct PROPERTIES SOVERSION ${MAJOR})
ADD_LIBRARY (${PROJ_LCASE} SHARED ${VALA_C} ${PROJECT_SOURCE_DIR}/src/vala_unsupported.c)
TARGET_LINK_LIBRARIES (${PROJ_LCASE} ${GEE_LIBRARIES})
SET_TARGET_PROPERTIES (${PROJ_LCASE} PROPERTIES VERSION ${VERSION})
SET_TARGET_PROPERTIES (${PROJ_LCASE} PROPERTIES SOVERSION ${MAJOR})
IF (WIN32)
SET_TARGET_PROPERTIES (laview-latex-struct PROPERTIES PREFIX "" IMPORT_PREFIX "" SUFFIX "-${MAJOR}.dll")
SET_TARGET_PROPERTIES (${PROJ_LCASE} PROPERTIES PREFIX "" IMPORT_PREFIX "" SUFFIX "-${MAJOR}.dll")
ENDIF (WIN32)
IF (UNIX)
INSTALL (TARGETS laview-latex-struct DESTINATION lib)
INSTALL (TARGETS ${PROJ_LCASE} DESTINATION lib)
ELSEIF (WIN32)
INSTALL (TARGETS laview-latex-struct
INSTALL (TARGETS ${PROJ_LCASE}
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
ENDIF (UNIX)
INSTALL (FILES ${CMAKE_BINARY_DIR}/src/laview-latex-struct-${MAJOR}.h DESTINATION include)
INSTALL (FILES ${CMAKE_BINARY_DIR}/src/${PROJ_LCASE}-${MAJOR}.h DESTINATION include)

View File

@ -14,24 +14,24 @@ FILE (GLOB_RECURSE ParseTestSources RELATIVE ${CMAKE_SOURCE_DIR}/test ParseTest.
VALA_PRECOMPILE (ParseTest_C ${ParseTestSources}
PACKAGES gee-0.8 posix
OPTIONS --thread ${VALA_DEBUG}
CUSTOM_VAPIS ${PROJECT_BINARY_DIR}/src/laview-latex-struct-${MAJOR}.vapi
CUSTOM_VAPIS ${PROJECT_BINARY_DIR}/src/${PROJ_LCASE}-${MAJOR}_internal.vapi
GENERATE_VAPI
GENERATE_HEADER
)
ADD_EXECUTABLE (ParseTest ${ParseTest_C})
TARGET_LINK_LIBRARIES (ParseTest laview-latex-struct ${GEE_LIBRARIES})
TARGET_LINK_LIBRARIES (ParseTest ${PROJ_LCASE} ${GEE_LIBRARIES})
# add ltable_test executable
FILE (GLOB_RECURSE LTableTestSources RELATIVE ${CMAKE_SOURCE_DIR}/test LTableTest.vala)
VALA_PRECOMPILE (LTableTest_C ${LTableTestSources}
PACKAGES gee-0.8 posix
OPTIONS --thread ${VALA_DEBUG}
CUSTOM_VAPIS ${PROJECT_BINARY_DIR}/src/laview-latex-struct-${MAJOR}.vapi
CUSTOM_VAPIS ${PROJECT_BINARY_DIR}/src/${PROJ_LCASE}-${MAJOR}_internal.vapi
GENERATE_VAPI
GENERATE_HEADER
)
ADD_EXECUTABLE (LTableTest ${LTableTest_C})
TARGET_LINK_LIBRARIES (LTableTest laview-latex-struct ${GEE_LIBRARIES})
TARGET_LINK_LIBRARIES (LTableTest ${PROJ_LCASE} ${GEE_LIBRARIES})
# parsing test macro
MACRO (do_parse_test testname table_path etalon_path regexp)