Skip to content

Commit

Permalink
More consistent module names
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanMeans committed Feb 28, 2020
1 parent 5e5cd7e commit ae14a8d
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 86 deletions.
6 changes: 2 additions & 4 deletions modules/c++/nitf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,18 @@ add_library(nitf-c++ source/BandInfo.cpp
source/Writer.cpp)

common_module_config(nitf-c++)
target_link_libraries(nitf-c++ nitf except-c++ io-c++ mt-c++ sys-c++ str-c++)
target_link_libraries(nitf-c++ nitf-c except-c++ io-c++ mt-c++ sys-c++ str-c++)
if (MSVC)
target_link_libraries(nitf-c++ wsock32 ws2_32)
endif()
target_compile_features(nitf-c++ PUBLIC cxx_inheriting_constructors)

add_dependencies(nitf-c++ coda-oss nitf)

set(unittest_srcs test_field++
test_image_blocker
test_image_segment_blank_nm_compression
test_image_segment_computer
test_nitf_buffer_list
test_tre_mods++)

set(unittest_deps nitf-c++ nitf math-c++)
set(unittest_deps nitf-c++ math-c++)
add_unittests("${unittest_srcs}" cpp "${unittest_deps}" nitf)
2 changes: 1 addition & 1 deletion modules/c/cgm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ add_library(cgm source/CircleElement.c
source/Vertex.c
source/VertexClose.c)
common_module_config(cgm)
target_link_libraries(cgm nitf)
target_link_libraries(cgm nitf-c)
2 changes: 1 addition & 1 deletion modules/c/j2k/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ add_library(j2k-c source/Container.c
common_module_config(j2k-c)
add_dependencies(j2k-c coda-oss)

target_link_libraries(j2k-c j2k_config J2K nrt nitf)
target_link_libraries(j2k-c j2k_config J2K nitf-c)
2 changes: 1 addition & 1 deletion modules/c/jpeg/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
add_library(jpeg-c source/LibjpegDecompress.c)
add_dependencies(jpeg-c coda-oss)
target_link_libraries(jpeg-c JPEG nitf)
target_link_libraries(jpeg-c JPEG nitf-c)
target_include_directories(jpeg-c PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
install(TARGETS jpeg-c)
100 changes: 50 additions & 50 deletions modules/c/nitf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/nitf/nitf_config.h.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/include/nitf/nitf_config.h)

add_library(nitf source/BandInfo.c
source/BandSource.c
source/ComplexityLevel.c
source/ComponentInfo.c
source/DESegment.c
source/DESubheader.c
source/DataSource.c
source/DefaultTRE.c
source/DirectBlockSource.c
source/DownSampler.c
source/Extensions.c
source/Field.c
source/FieldWarning.c
source/FileHeader.c
source/FileSecurity.c
source/GraphicSegment.c
source/GraphicSubheader.c
source/ImageIO.c
source/ImageReader.c
source/ImageSegment.c
source/ImageSource.c
source/ImageSubheader.c
source/ImageWriter.c
source/LabelSegment.c
source/LabelSubheader.c
source/LookupTable.c
source/PluginRegistry.c
source/RESegment.c
source/RESubheader.c
source/Reader.c
source/Record.c
source/RowSource.c
source/SegmentReader.c
source/SegmentSource.c
source/SegmentWriter.c
source/StreamIOWriteHandler.c
source/SubWindow.c
source/TRE.c
source/TRECursor.c
source/TREPrivateData.c
source/TREUtils.c
source/TextSegment.c
source/TextSubheader.c
source/WriteHandler.c
source/Writer.c)
add_library(nitf-c source/BandInfo.c
source/BandSource.c
source/ComplexityLevel.c
source/ComponentInfo.c
source/DESegment.c
source/DESubheader.c
source/DataSource.c
source/DefaultTRE.c
source/DirectBlockSource.c
source/DownSampler.c
source/Extensions.c
source/Field.c
source/FieldWarning.c
source/FileHeader.c
source/FileSecurity.c
source/GraphicSegment.c
source/GraphicSubheader.c
source/ImageIO.c
source/ImageReader.c
source/ImageSegment.c
source/ImageSource.c
source/ImageSubheader.c
source/ImageWriter.c
source/LabelSegment.c
source/LabelSubheader.c
source/LookupTable.c
source/PluginRegistry.c
source/RESegment.c
source/RESubheader.c
source/Reader.c
source/Record.c
source/RowSource.c
source/SegmentReader.c
source/SegmentSource.c
source/SegmentWriter.c
source/StreamIOWriteHandler.c
source/SubWindow.c
source/TRE.c
source/TRECursor.c
source/TREPrivateData.c
source/TREUtils.c
source/TextSegment.c
source/TextSubheader.c
source/WriteHandler.c
source/Writer.c)


common_module_config(nitf)
common_module_config(nitf-c)

target_link_libraries(nitf nrt)
target_compile_definitions(nitf PUBLIC
target_link_libraries(nitf-c nrt-c)
target_compile_definitions(nitf-c PUBLIC
NITF_DEFAULT_PLUGIN_PATH="${CMAKE_INSTALL_PREFIX}/share/nitf/plugins")


Expand All @@ -63,7 +63,7 @@ set(unittest_srcs test_create
test_tre_mods
test_zero_field)

add_unittests("${unittest_srcs}" c nitf nitf)
add_unittests("${unittest_srcs}" c nitf-c nitf)


# Build all the TRE
Expand Down Expand Up @@ -161,7 +161,7 @@ set(tre_srcs ACCHZB

foreach(tre ${tre_srcs})
add_library(${tre} SHARED shared/${tre}.c)
target_link_libraries(${tre} nitf)
target_link_libraries(${tre} nitf-c)

# This line is making sure the resultant TRE is named, e.g.
# XML_DATA_CONTENT.so instead of libXML_DATA_CONTENT.so
Expand Down
46 changes: 23 additions & 23 deletions modules/c/nrt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@ include(CheckSymbolExists)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/nrt/nrt_config.h.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/include/nrt/nrt_config.h)

add_library(nrt source/DateTime.c
source/Debug.c
source/DirectoryUnix.c
source/DirectoryWin32.c
source/DLLUnix.c
source/DLLWin32.c
source/Error.c
source/HashTable.c
source/IntStack.c
source/IOHandleUnix.c
source/IOHandleWin32.c
source/IOInterface.c
source/List.c
source/Pair.c
source/SyncIrix.c
source/SyncUnix.c
source/SyncWin32.c
source/System.c
source/Tree.c
source/Utils.c)
add_library(nrt-c source/DateTime.c
source/Debug.c
source/DirectoryUnix.c
source/DirectoryWin32.c
source/DLLUnix.c
source/DLLWin32.c
source/Error.c
source/HashTable.c
source/IntStack.c
source/IOHandleUnix.c
source/IOHandleWin32.c
source/IOInterface.c
source/List.c
source/Pair.c
source/SyncIrix.c
source/SyncUnix.c
source/SyncWin32.c
source/System.c
source/Tree.c
source/Utils.c)

target_link_libraries(nrt ${CMAKE_DL_LIBS} coda_oss_config)
common_module_config(nrt)
target_link_libraries(nrt-c ${CMAKE_DL_LIBS} coda_oss_config)
common_module_config(nrt-c)

set(unittest_srcs test_buffer_adapter
test_core_values
Expand All @@ -36,4 +36,4 @@ set(unittest_srcs test_buffer_adapter
test_tree
test_utils)

add_unittests("${unittest_srcs}" c nrt nrt)
add_unittests("${unittest_srcs}" c nrt-c nrt)
3 changes: 1 addition & 2 deletions modules/java/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ if (!JNI_FOUND)
message(WARNING "JNI libraries not found. Skipping Java modules")
elseif(!Java_FOUND)
message(WARNING "Java SDK not found. Skipping Java modules")
endif()
#else()
# set(CMAKE_JAVA_COMPILE_FLAGS "-source" "1.5" "-target" "1.5")
#
Expand All @@ -44,4 +43,4 @@ endif()
# add_subdirectory(cgm)
# add_subdirectory(nitf.imageio)
# add_subdirectory(nitf.imagej)
#endif()
endif()
9 changes: 5 additions & 4 deletions modules/python/nitf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ if (Python_FOUND)
OUTFILE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/source/generated
SOURCES source/nitro.i)

target_include_directories(nitropy PRIVATE ${Python_INCLUDE_DIRS} ${Python_NumPy_INCLUDE_DIRS}
${NITRO_C_SOURCE_DIR}/nrt/include
${NITRO_C_SOURCE_DIR}/nitf/include)
target_link_libraries(nitropy nitf numpyutils-c++ sys-c++ except-c++ io-c++ str-c++)
target_include_directories(nitropy PRIVATE ${Python_INCLUDE_DIRS}
${Python_NumPy_INCLUDE_DIRS})
# ${NITRO_C_SOURCE_DIR}/nrt/include
# ${NITRO_C_SOURCE_DIR}/nitf/include)
target_link_libraries(nitropy nitf-c numpyutils-c++ sys-c++ except-c++ io-c++ str-c++)
install(TARGETS nitropy DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/site-packages/)
install(FILES source/__init__.py source/generated/nitropy.py
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/site-packages/)
Expand Down

0 comments on commit ae14a8d

Please sign in to comment.