Skip to content

Commit 4d1dfe8

Browse files
committed
This fixes issue #128. Gtest should not be installed. the .bin folder is removed. version bump.
1 parent 8f5924d commit 4d1dfe8

File tree

9 files changed

+14
-53
lines changed

9 files changed

+14
-53
lines changed

CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@ option(OJPH_ENABLE_TIFF_SUPPORT "Enables input and output support for TIFF files
1919
option(OJPH_BUILD_TESTS "Enables building test code" OFF)
2020
option(OJPH_BUILD_EXECUTABLES "Enables building command line executables" ON)
2121

22-
## specify output directories
23-
set(OJPH_DESTINATION_BINARY ${CMAKE_BINARY_DIR}/../bin)
24-
set(OJPH_DESTINATION_ARCHIVE ${CMAKE_BINARY_DIR}/../lib)
25-
26-
## specify the top directory for TIFF library (only for Micrsoft)
22+
## specify the top directory for TIFF library (only for Microsoft Visual Studio)
2723
if (MSVC)
2824
set(TIFF_PATH "C:\\Program Files\\tiff")
2925
endif()

bin/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/apps/CMakeLists.txt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,3 @@ endif()
3434
## Build executables
3535
add_subdirectory(ojph_expand)
3636
add_subdirectory(ojph_compress)
37-
38-
if (MSVC AND OJPH_ENABLE_TIFF_SUPPORT)
39-
if (CMAKE_BUILD_TYPE MATCHES "Release")
40-
file(COPY "${TIFF_PATH}\\bin\\tiff.dll" DESTINATION "${OJPH_DESTINATION_BINARY}")
41-
file(COPY "${TIFF_PATH}\\bin\\tiffxx.dll" DESTINATION "${OJPH_DESTINATION_BINARY}")
42-
elseif(CMAKE_BUILD_TYPE MATCHES "Debug")
43-
file(COPY "${TIFF_PATH}\\bin\\tiffd.dll" DESTINATION "${OJPH_DESTINATION_BINARY}")
44-
file(COPY "${TIFF_PATH}\\bin\\tiffxxd.dll" DESTINATION "${OJPH_DESTINATION_BINARY}")
45-
endif()
46-
endif()

src/apps/ojph_compress/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,3 @@ else()
4949

5050
install(TARGETS ojph_compress DESTINATION bin)
5151
endif()
52-
53-
## copy target files to the top bin folder
54-
add_custom_command(TARGET ojph_compress POST_BUILD
55-
COMMAND ${CMAKE_COMMAND} -E make_directory ${OJPH_DESTINATION_BINARY}
56-
COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:ojph_compress>" ${OJPH_DESTINATION_BINARY}
57-
)

src/apps/ojph_expand/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,3 @@ else()
4949

5050
install(TARGETS ojph_expand DESTINATION bin)
5151
endif()
52-
53-
## copy target files to the top bin folder
54-
add_custom_command(TARGET ojph_expand POST_BUILD
55-
COMMAND ${CMAKE_COMMAND} -E make_directory ${OJPH_DESTINATION_BINARY}
56-
COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:ojph_expand>" ${OJPH_DESTINATION_BINARY}
57-
)

src/core/CMakeLists.txt

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,3 @@ else()
9494
SOVERSION "${OPENJPH_VERSION_MAJOR}.${OPENJPH_VERSION_MINOR}"
9595
VERSION "${OPENJPH_VERSION}")
9696
endif()
97-
98-
## copy target files to the top bin folder
99-
add_custom_command(TARGET openjph POST_BUILD
100-
COMMAND ${CMAKE_COMMAND} -E make_directory ${OJPH_DESTINATION_BINARY}
101-
COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:openjph>" ${OJPH_DESTINATION_BINARY}
102-
COMMAND ${CMAKE_COMMAND} -E make_directory ${OJPH_DESTINATION_ARCHIVE}
103-
COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_LINKER_FILE:openjph>" ${OJPH_DESTINATION_ARCHIVE}
104-
)
105-
if (MSVC)
106-
add_custom_command(TARGET openjph POST_BUILD
107-
COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_LINKER_FILE_DIR:openjph>/${OJPH_LIB_NAME_STRING}.exp" ${OJPH_DESTINATION_ARCHIVE}
108-
)
109-
endif()
110-
if(EMSCRIPTEN)
111-
add_custom_command(TARGET openjphsimd POST_BUILD
112-
COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:openjphsimd>" ${OJPH_DESTINATION_BINARY}
113-
)
114-
endif()

src/core/common/ojph_version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@
3535

3636
#define OPENJPH_VERSION_MAJOR 0
3737
#define OPENJPH_VERSION_MINOR 10
38-
#define OPENJPH_VERSION_PATCH 4
38+
#define OPENJPH_VERSION_PATCH 5

tests/CMakeLists.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ FetchContent_Declare(
99
# For Windows: Prevent overriding the parent project's compiler/linker settings
1010
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
1111
set(BUILD_GMOCK OFF CACHE BOOL "" FORCE)
12+
option(INSTALL_GTEST "Enable installation of googletest." OFF)
1213
FetchContent_MakeAvailable(googletest)
1314

1415
# Fetch test files
@@ -66,9 +67,15 @@ if (MSVC)
6667
file(COPY "${TIFF_PATH}\\bin\\tiffxxd.dll" DESTINATION "./")
6768
endif()
6869
endif()
69-
elseif(MSYS)
70+
else()
7071
add_custom_command(TARGET test_executables POST_BUILD
71-
COMMAND ${CMAKE_COMMAND} -E copy "../bin/msys-gtest.dll" "./"
72-
COMMAND ${CMAKE_COMMAND} -E copy "../bin/msys-gtest_main.dll" "./"
72+
COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:ojph_expand>" "./"
73+
COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:ojph_compress>" "./"
7374
)
75+
if(MSYS)
76+
add_custom_command(TARGET test_executables POST_BUILD
77+
COMMAND ${CMAKE_COMMAND} -E copy "../bin/msys-gtest.dll" "./"
78+
COMMAND ${CMAKE_COMMAND} -E copy "../bin/msys-gtest_main.dll" "./"
79+
)
80+
endif()
7481
endif()

tests/test_executables.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ int execute(const std::string& cmd, std::string& result)
107107
#define REF_FILE_DIR "./jp2k_test_codestreams/openjph/references/"
108108
#define MSE_PAE_PATH "./mse_pae"
109109
#define COMPARE_FILES_PATH "./compare_files"
110-
#define EXPAND_EXECUTABLE "../../bin/ojph_expand"
111-
#define COMPRESS_EXECUTABLE "../../bin/ojph_compress"
110+
#define EXPAND_EXECUTABLE "./ojph_expand"
111+
#define COMPRESS_EXECUTABLE "./ojph_compress"
112112
#endif
113113
#define TOL_DOUBLE 0.01
114114
#define TOL_INTEGER 1

0 commit comments

Comments
 (0)