library linking and building works for DMD on Linux
This commit is contained in:
parent
22e367dcfc
commit
f8f9246c90
1 changed files with 13 additions and 4 deletions
|
@ -88,14 +88,23 @@ INCLUDE(CMakeCommonLanguageInclude)
|
|||
# Static library tools
|
||||
# <CMAKE_AR>
|
||||
# <CMAKE_RANLIB>
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GDC)
|
||||
SET(CMAKE_OUTPUT_D_FLAG "-o ")
|
||||
# SET(CMAKE_SHARED_LIBRARY_D_FLAGS "-g -O2 -fPIC")
|
||||
# SET(CMAKE_SHARED_LIBRARY_CREATE_D_FLAGS "-shared")
|
||||
SET(CMAKE_SHARED_LIBRARY_D_FLAGS "-fPIC")
|
||||
SET(CMAKE_SHARED_LIBRARY_CREATE_D_FLAGS "-shared")
|
||||
ELSE(CMAKE_COMPILER_IS_GDC)
|
||||
SET(CMAKE_OUTPUT_D_FLAG "-of")
|
||||
# SET(CMAKE_SHARED_LIBRARY_D_FLAGS "-g -O -L-fPIC")
|
||||
# SET(CMAKE_SHARED_LIBRARY_CREATE_D_FLAGS "-L-shared")
|
||||
IF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
# not a good way but works because dmd using gcc
|
||||
# for linker on Linux
|
||||
SET(CMAKE_LINK_LIBRARY_FLAG "-L-l")
|
||||
SET(CMAKE_LIBRARY_PATH_FLAG "-L-L")
|
||||
ELSE(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
# dmd part doesn't work for now
|
||||
SET(CMAKE_LINK_LIBRARY_FLAG "-L+")
|
||||
SET(CMAKE_LIBRARY_PATH_FLAG "-I")
|
||||
ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
ENDIF(CMAKE_COMPILER_IS_GDC)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue