11
2- include_directories (common)
3-
42file (GLOB CODESTREAM "codestream/*.cpp" "codestream/*.h" )
53file (GLOB CODESTREAM_SSE "codestream/*_sse.cpp" )
64file (GLOB CODESTREAM_SSE2 "codestream/*_sse2.cpp" )
@@ -34,14 +32,8 @@ source_group("others" FILES ${OTHERS})
3432source_group ("transform" FILES ${TRANSFORM} )
3533
3634if (EMSCRIPTEN)
37- add_compile_options (-std=c++11 -O3 -fexceptions)
38- add_library (openjph ${SOURCES} )
39- add_library (openjphsimd ${SOURCES} ${CODESTREAM_WASM} ${CODING_WASM} ${TRANSFORM_WASM} )
40-
41- target_include_directories (openjph PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /common> $<INSTALL_INTERFACE:include >)
42- target_include_directories (openjphsimd PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /common> $<INSTALL_INTERFACE:include >)
43-
44- target_compile_options (openjphsimd PRIVATE -DOJPH_ENABLE_WASM_SIMD -msimd128)
35+ add_compile_options (-std=c++11 -O3 -fexceptions -DOJPH_ENABLE_WASM_SIMD -msimd128)
36+ list (APPEND SOURCES ${CODESTREAM_WASM} ${CODING_WASM} ${TRANSFORM_WASM} )
4537
4638 source_group ("codestream" FILES ${CODESTREAM_WASM} )
4739 source_group ("coding" FILES ${CODING_WASM} )
@@ -114,18 +106,19 @@ else()
114106
115107 endif ()
116108
117- add_library (openjph ${SOURCES} )
118109
119110endif ()
120111
112+ add_library (openjph ${SOURCES} )
113+
121114## The option BUILD_SHARED_LIBS
122115if (BUILD_SHARED_LIBS AND WIN32 )
123116 target_compile_definitions (openjph PRIVATE OJPH_BUILD_SHARED_LIBRARY)
124117endif ()
125118
126119## include library version/name
127- target_include_directories (openjph PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /common> $<INSTALL_INTERFACE:include >)
128120target_compile_definitions (openjph PUBLIC _FILE_OFFSET_BITS=64)
121+ target_include_directories (openjph PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /common> $<INSTALL_INTERFACE:include /openjph>)
129122
130123if (MSVC )
131124 set (OJPH_LIB_NAME_STRING "openjph.${OPENJPH_VERSION_MAJOR} .${OPENJPH_VERSION_MINOR} " )
@@ -139,3 +132,13 @@ else()
139132 SOVERSION "${OPENJPH_VERSION_MAJOR} .${OPENJPH_VERSION_MINOR} "
140133 VERSION "${OPENJPH_VERSION} " )
141134endif ()
135+
136+ install (TARGETS openjph
137+ EXPORT openjph-config
138+ )
139+
140+ install (DIRECTORY common/
141+ DESTINATION include /openjph
142+ FILES_MATCHING
143+ PATTERN "*.h"
144+ )
0 commit comments