add library before linking
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
9106ca3367
commit
8163f5bcd5
|
@ -56,6 +56,12 @@ if(BUILD_SHARED_LIBS)
|
||||||
set(LINKSTYLE PUBLIC)
|
set(LINKSTYLE PUBLIC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(BUILD_SHARED_LIBS)
|
||||||
|
add_library(Cram SHARED ${SOURCE_FILES})
|
||||||
|
else()
|
||||||
|
add_library(Cram STATIC ${SOURCE_FILES})
|
||||||
|
endif()
|
||||||
|
|
||||||
if(BUILD_CLI)
|
if(BUILD_CLI)
|
||||||
file(GLOB CLI_SOURCES
|
file(GLOB CLI_SOURCES
|
||||||
tools/cli/lib/stb_image_write.h
|
tools/cli/lib/stb_image_write.h
|
||||||
|
@ -80,10 +86,11 @@ if(BUILD_CLI)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_SHARED_LIBS)
|
|
||||||
add_library(Cram SHARED ${SOURCE_FILES})
|
# Build flags
|
||||||
else()
|
if(NOT MSVC)
|
||||||
add_library(Cram STATIC ${SOURCE_FILES})
|
set_property(TARGET Cram PROPERTY COMPILE_FLAGS "-std=gnu99 -Wall -Wno-strict-aliasing -pedantic")
|
||||||
|
target_link_libraries(Cram PUBLIC m)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# includes
|
# includes
|
||||||
|
|
Loading…
Reference in New Issue