|
1 | | - |
2 | | -add_library(heclib_c OBJECT ${C_SRC}) |
| 1 | +add_library(heclib STATIC) |
3 | 2 |
|
4 | 3 | if( ${CMAKE_C_COMPILER_ID} MATCHES GNU) |
5 | | - target_compile_options(heclib_c PRIVATE -fPIC -std=gnu99) |
| 4 | + target_compile_options(heclib PRIVATE -fPIC -std=gnu99) |
6 | 5 | elseif(${CMAKE_C_COMPILER_ID} MATCHES SunPro) |
7 | | - target_compiler_options(heclib_c PRIVATE -m64 -xmemalign=2i -xcode=pic32 -c -Isrc/headers -mt -xcode=abs64 -xstrconst -xc99=all -xCC -g -xs) |
| 6 | + target_compile_options(heclib PRIVATE -m64 -xmemalign=2i -xcode=pic32 -c -Isrc/headers -mt -xcode=abs64 -xstrconst -xc99=all -xCC -g -xs) |
| 7 | +elsif(MSVC) |
| 8 | + target_compile_options(heclib PRIVATE /Wall /MP) |
8 | 9 | else() |
9 | 10 | message(STATUS "generic options") |
10 | 11 | endif() |
11 | | -target_include_directories(heclib_c PUBLIC src/headers) |
12 | | -target_link_libraries(heclib_c PRIVATE ZLIB::ZLIBSTATIC) |
13 | | -# Keep all logic above this like, only include source references here (including headers) |
14 | | -target_sources(heclib_c PUBLIC # most of this should really be private but for the sake of initial simplicity don't worry about it. |
| 12 | + |
| 13 | + |
| 14 | +target_include_directories(heclib PUBLIC src/headers) |
| 15 | + |
| 16 | +if(MSVC) |
| 17 | + target_link_libraries(heclib PUBLIC zlibstatic) |
| 18 | +else() |
| 19 | + target_link_libraries(heclib PUBLIC ZLIB::ZLIBSTATIC) |
| 20 | +endif() |
| 21 | + |
| 22 | +target_sources(heclib PRIVATE |
15 | 23 | src/Internal/ztsIncrementBlock.c |
16 | 24 | src/Internal/zhash.c |
17 | 25 | src/Internal/zpdUnitsToHead.c |
@@ -53,7 +61,6 @@ src/Internal/ztsIrregStoreBlock.c |
53 | 61 | src/Internal/ztsRegRepeatCompress.c |
54 | 62 | src/Internal/zreadInfo.c |
55 | 63 | src/Internal/zinitIfltab.c |
56 | | -src/Internal/powf_wrap.c |
57 | 64 | src/Internal/zcatParsePath.c |
58 | 65 | src/Internal/ztsGetSizesInternal.c |
59 | 66 | src/Internal/zcheckInternal.c |
|
0 commit comments