Skip to content

Commit

Permalink
fix cmake syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
isuruf committed Mar 25, 2024
1 parent 78d0874 commit 55983e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions recipe/0001-Do-not-override-CXXFLAGS-for-the-libraries.patch
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ index b06ac4575..a88f8114f 100644
ADD_LIBRARY(${SHARED_TARGET} SHARED ${SOURCE_FILES} ${SOURCE_INCLUDE_FILES} ${API_ABS_INCLUDE_FILES})
- SET_TARGET_PROPERTIES(${SHARED_TARGET} PROPERTIES LINK_FLAGS "${EXTRA_LINK_FLAGS}" COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -DOPENMM_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY -DPTHREAD_BUILDING_SHARED_LIBRARY" SOVERSION "${OPENMM_MAJOR_VERSION}.${OPENMM_MINOR_VERSION}")
+ SET_TARGET_PROPERTIES(${SHARED_TARGET} PROPERTIES SOVERSION "${OPENMM_MAJOR_VERSION}.${OPENMM_MINOR_VERSION}")
+ TARGET_LINK_OPTIONS(${SHARED_TARGET} PRIVATE "${EXTRA_LINK_FLAGS}")
+ TARGET_COMPILE_OPTIONS(${SHARED_TARGET} PRIVATE "${EXTRA_COMPILE_FLAGS} -DOPENMM_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY -DPTHREAD_BUILDING_SHARED_LIBRARY")
+ TARGET_LINK_OPTIONS(${SHARED_TARGET} PRIVATE ${EXTRA_LINK_FLAGS})
+ TARGET_COMPILE_OPTIONS(${SHARED_TARGET} PRIVATE ${EXTRA_COMPILE_FLAGS} -DOPENMM_BUILDING_SHARED_LIBRARY -DLEPTON_BUILDING_SHARED_LIBRARY -DPTHREAD_BUILDING_SHARED_LIBRARY)
ENDIF(OPENMM_BUILD_SHARED_LIB)

IF(OPENMM_BUILD_STATIC_LIB)
ADD_LIBRARY(${STATIC_TARGET} STATIC ${SOURCE_FILES} ${SOURCE_INCLUDE_FILES} ${API_ABS_INCLUDE_FILES})
SET(EXTRA_COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -DOPENMM_USE_STATIC_LIBRARIES -DLEPTON_USE_STATIC_LIBRARIES -DPTW32_STATIC_LIB")
- SET_TARGET_PROPERTIES(${STATIC_TARGET} PROPERTIES LINK_FLAGS "${EXTRA_LINK_FLAGS}" COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} -DOPENMM_BUILDING_STATIC_LIBRARY -DLEPTON_BUILDING_STATIC_LIBRARY -DPTHREAD_BUILDING_STATIC_LIBRARY")
+ TARGET_LINK_OPTIONS(${STATIC_TARGET} PRIVATE "${EXTRA_LINK_FLAGS}")
+ TARGET_COMPILE_OPTIONS(${STATIC_TARGET} PRIVATE "${EXTRA_COMPILE_FLAGS} -DOPENMM_BUILDING_STATIC_LIBRARY -DLEPTON_BUILDING_STATIC_LIBRARY -DPTHREAD_BUILDING_STATIC_LIBRARY")
+ TARGET_LINK_OPTIONS(${STATIC_TARGET} PRIVATE ${EXTRA_LINK_FLAGS})
+ TARGET_COMPILE_OPTIONS(${STATIC_TARGET} PRIVATE ${EXTRA_COMPILE_FLAGS} -DOPENMM_BUILDING_STATIC_LIBRARY -DLEPTON_BUILDING_STATIC_LIBRARY -DPTHREAD_BUILDING_STATIC_LIBRARY)
ENDIF(OPENMM_BUILD_STATIC_LIB)

IF(OPENMM_BUILD_C_AND_FORTRAN_WRAPPERS)
Expand Down

0 comments on commit 55983e6

Please sign in to comment.